GRM Syntax - Overview

The GRM syntax consists of command lines, which are terminated by semicolons. The complete command syntax for GRM is shown below. Note that terms in curly brackets ({}) denote alternate specifications (e.g., LACKOFFIT = NO or LACKOFFIT = YES); optional keywords are enclosed in brackets ([]); all keywords are shown in upper case letters (even thought the syntax interpreter is not case sensitive).

GRM and GLM syntax conventions
The GRM syntax conventions are essentially identical to the GLM syntax conventions (see the General Linear Model (GLM) module), with only a few additions and omissions relating to stepwise and best subset analyses. The following is a list of keywords available in GRM; note that the Generalized Linear/Nonlinear Models (GLZ) and General Partial Least Squares Models (PLS) modules also use similar syntax, with sets of additional keywords (options) that are specific to those particular applications. To learn more about each keyword, click on it.

[GRM;]

DEPENDENT [=] { Variable List };
[GROUPS [=] { NONE };
    { Variable [(Value List)
    .......
    Variable [(Value List)] };]
[COVARIATE [=] { NONE };
     { Variable List };]
[DESIGN [=] { NONE };
    { Effects };]
[INTERCEPT [=] { INCLUDE }
    { EXCLUDE };]
[ LACKOFFIT [=] { NO }
    { YES };]
[ESTIMATE [=] { NONE };
    { Value list }]
        .......
[ESTIMATE [=] { Value list };]
[ SDELTA [=] { Value };]
[ IDELTA [=] { Value };]
[SURFACE [=] { NONE }
    { Covariate Variable List };]
[MIXTURE [=] { NONE }
    { Covariate Variable List };]
[SAMPLE [=] { NONE }
    { Variable (Value) };]
[MBUILD [=] { all }
    { FORWARD };
    { BACKWARD };
    { FSTEPWISE };
    { BSTEPWISE };
    { BESTSUBSET };]
[FORCE [=] Integer Value;]
[MAXSTEP [=] Integer Value;]
[P1ENTER [=] Value;]
[P2REMOVE [=] Value;]
[F1ENTER [=] Value;]
[F2REMOVE [=] Value;]
[STEPCRIT [=] { P }
    { F }]
[BESTCRIT [=] { RSQUARED }
    { ADJRSQUARED }
    { MALLOWSCP };]
[START [=] Integer Value;]
[STOP [=] Integer Value;]
[MAXSUB [=] Integer Value;]
[OUTPUT [=] { NONE }
    { List of options (integers) };]
Example
Shown below is an example specification for a stepwise regression analysis that includes two categorical predictors and their interaction, as well as continuous predictor variables (use example datafile Exp.sta to run this example).
DEPENDENT = STRESS_R;
GROUPS = GROUP GENDER;
COVARIATE = CORRECT1 CORRECT2 CORRECT3;
DESIGN = CORRECT1+CORRECT2+CORRECT3 + GROUP | GENDER;
MBUILD = FSTEPWISE;
MAXSTEP = 10;
P1ENTER = .10;
P2REMOVE = .10;
STEPCRIT = P;

For more examples, see the GRM Syntax Examples section.

Upper case and lower case letters
The syntax editor is not case sensitive; i.e., DEPENDENT and dependent or Dependent are all valid specifications of the same keyword.
Order of keywords
The order of keywords should follow that implied in the complete listing of all keywords shown above. Note that, while most of the options can be specified in any order, the Design statement must follow the Dependent, Groups, and Covariate specifications. In general, when a keyword references a variable or effect previously defined, then that specification must occur before the respective keyword reference.
Comments
You can insert comments into the syntax by placing them in curly brackets (e.g., { This is a comment }), or after a pound sign (e.g., ... # This is a comment; all text starting at the pound sign to the end of the respective line will be treated as a comment). You can place comments in between any keywords of the syntax, and you can include several comment lines. Comments will be ignored when the syntax is parsed.