Example 4.1: Estimating Two Different Models
When specifying regression functions, you can use logical expressions that will evaluate to 0 if they are false, and to 1 if they are true. This example demonstrates how one can estimate separate regression parameters for each of the plants in Example 4. Specifically, instead of using the b1 parameter in the model above, use logical operators to estimate the different b0 parameters directly. Return to the User-Specified Regression, Custom Loss dialog by clicking the Cancel button on the Results dialog. Click the Function to be estimated & loss function button to display the Estimated function and loss function dialog. Specify the model v3=b0A*(v1=1)+b0B*(v1=0)+b3*exp(b2*v2) in the Estimated Function box.
Note how the logical operators are used in this example. If v1 (Location) is equal to 1, then STATISTICA will estimate b0A, that is, the constant for plant A; if v1 is equal to 0 then STATISTICA will estimate b0B. Now, proceed as in Example 4. Select 0 as the common Start value (or to speed things up, you can choose start values that are closer to the final solution) and Rosenbrock and quasi-Newton as the Estimation method on the Model Estimation dialog. The parameter estimates are shown below (click the Summary: Parameters & standard error button on the Results - Quick tab).
The estimates are, as expected, based on the previous analysis, that is, the constant for plant A is 1.0156-.04727*1=.9683, and for plant B it is 1.0156-.04727*0=1.0156.