Adds or drops terms from a
REML fixed model in a Genstat regression (R.W. Payne).
|Controls printed output (
||Limit for expansion of terms; default 3|
||Whether to base ratios in accumulated summary on rms from model with smallest residual ss or smallest residual ms (
||One or two criteria to be printed with the models (
||Fixed terms to be added or dropped|
VRSWITCH is one of several procedures designed to improve the process of determining the appropriate fixed terms to include in a
REML analysis. (The others are
VRTRY.) They do this by a generalized regression analysis, with a weight matrix based on variances estimated from the original
REML analysis (with the full fixed model). See
VRFIT for details.
Before fitting the terms, the
VRSETUP procedure must be called to make some checks, and initialize the regression by specifying a
MODEL command with the necessary weight matrix and a
TERMS command with the full fixed model. It also uses the
WORKSPACE directive to set up a Genstat workspace structure to store control information and results.
VRFIT will call
VRSETUP for you, if you have not done so already. The analysis will then be based on the most recent
REML analysis. To use an earlier analysis, you should call
VRSETUP yourself, setting its SAVE option set to the save structure of the required
In principle the
VRFIT procedure should also be called before
VRSWITCH is used. However,
VRSWITCH will call
VRFIT with a null model (i.e. only the constant) if
VRFIT has not been used already. So you can start investigating the fixed model just by calling
VRSETUP will be called for you, automatically).
TERMS parameter specifies the terms to be added or dropped, in a similar way to the
SWITCH directive. Any term that is not already in the current model is added to the model. Conversely, those that are already in the model are dropped. The
FACTORIAL option sets a limit (by default 3) on the number of factors and variates in each term. Terms containing more than that number are omitted.
grid is relevant only to the fitting of nonlinear models.) See
VRDISPLAY for more details.
DENOMINATOR option specifies how the residual is selected for the accumulated analysis of variance By default it is taken from the model with the smallest number of residual degrees of freedom. However, you can set
DENOMINATOR=ms to take it from the model with the smallest residual mean square.
SELECTION option specifies the statistics to be displayed in the summary of analysis as in the regression directives, except that again some irrelevant settings are omitted. See
VRDISPLAY for more details.
Any restriction applied to vectors used in the
REML analysis will apply also to the results from
CAPTION 'VRSWITCH example',\ 'Example 5.3.6 from The Guide to Genstat, Part 2 Statistics';\ STYLE=meta,plain FACTOR [NVALUES=322; LEVELS=27] Dam & [NVALUES=322; LEVELS=18] Pup FACTOR [NVALUES=322; LEVELS=2; LABELS=!T('M','F')] Sex FACTOR [NVALUES=322; LEVELS=3; LABELS=!T('C','Low','High')] Dose VARIATE [NVALUES=322] Littersize,Weight OPEN '%GENDIR%/Examples/GuidePart2/Rats.dat'; CHANNEL=chan READ [CHANNEL=chan] Dose,Sex,Littersize,Dam,Pup,Weight; \ FREPRESENTATION=2(labels),4(levels) CLOSE chan VCOMPONENTS [FIXED=Littersize+Dose*Sex] RANDOM=Dam/Pup REML [PRINT=model,components,wald] Weight VRFIT [PRINT=estimates] Littersize+Sex VRSWITCH [PRINT=estimates,accumulated] Sex+Dose