GRM Syntax - Example 4: Testing Equality of Regression Coefficients

This example illustrates how custom hypotheses tests can be specified via GRM syntax. Note that these tests can also be requested (using an efficient and convenient user-interface) from the Results dialog.  

You can run this example with the example data file Exp.sta. A multiple regression model (see also Example 1: Multiple Regression) is specified, and tests of custom hypotheses are requested (via the Estimate keyword). Specifically, the coefficients are used to form linear combinations of parameter estimates, and these linear combinations are then tested against zero. Thus the hypotheses in the Estimate statements below specify that the differences between the parameter estimates are equal to zero, and hence, that they are of equal magnitude. If these hypotheses are rejected, then one can assume that the three variables have differential effects on the dependent variable. Note that multiple Estimate statements are included, to perform separate tests for the differences between all pairs of predictors.

GLM;

{ Dependent variable: }

   DEPENDENT = STRESS_R;

   COVARIATE = CORRECT1 CORRECT2 CORRECT3;

{ A main-effects (multiple regression) design is specified. }

   DESIGN = CORRECT1 + CORRECT2 + CORRECT3;

{ The following statement is not necessary (the default value for Intercept is Include);

   it is added here to clarify the number of parameters for the Estimate

 statement. }

   INTERCEPT = INCLUDE;

{ The order and number of coefficients for the custom hypothesis must

   match the parameters in the model. Because the intercept is included in

   the multiple regression, there are 4 parameters. The first Estimate statement

   specifies the test of the hypothesis that the parameter estimates for all

   covariates are (simultaneously) the same (that the two independent pairwise

   differences between the parameter estimates are equal  to zero).  Note that this

   hypothesis has 2 degrees of freedom. }

   ESTIMATE = 0  1 -1  0

              0  1  0 -1;

{ The next Estimate statement specifies the test of the hypothesis that

   the parameter estimates for covariates Correct1 and Correct2 are

   identical. Note that this hypothesis has 1 degree of freedom.}

   ESTIMATE = 0  1 -1  0;

{ The next Estimate statement specifies the test of the hypothesis that

   the parameter estimates for covariates Correct1 and Correct3 are

   identical. }

   ESTIMATE = 0  1  0 -1;

{ The next Estimate statement specifies the test of the hypothesis that

   the parameter estimates for covariates Correct2 and Correct3 are

   identical. }

   ESTIMATE = 0  0  1 -1;

The results spreadsheets for these custom hypotheses can be requested from the Results dialog.  

For more examples, see GRM Syntax - Examples.