1. Home
  2. VRTRY procedure

VRTRY procedure

Tries the effect of adding and dropping individual terms from a REML fixed model in a Genstat regression (R.W. Payne).


PRINT = string tokens Controls printed output (changes); default chan
FACTORIAL = scalar Limit for expansion of terms; default 3
CHANGES = pointer Saves details of the changes


TERMS = formula Fixed terms to be added or dropped


VRTRY 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 VRFIT, VRADD, VRDISPLAY, VRDROP, VRKEEP, VRSETUP and VRSWITCH.) 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 any 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. However, 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 REML analysis.

In principle the VRFIT procedure should also be called before VRTRY is used. However, VRTRY 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 VRTRY (and VRFIT and VRSETUP will be called for you, automatically).

The TERMS parameter specifies the terms to be added or dropped, in a similar way to the TRY directive. Any term that is not already in the current model is added to the model. The effect of the change is recorded, and then the term is taken back out of the model. Conversely, any term that is already in the current model is dropped from the model. Again, the effect of the change is recorded, before the term is added back into the model. 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.

By default VRTRY prints a table showing the effect of adding and dropping the various terms. However, you can suppress that by setting option PRINT=*.

You can use the CHANGES option to save information about the changes in a pointer. The first elements of the pointer, labelled ‘Change‘, ‘s.s.’, ‘n.d.f.‘ and ‘d.d.f.’, save the corresponding columns of the table in a text (‘Change‘) and three variates. The final element, ‘term‘, is a pointer storing a model formula for the term associated with each change. The final line of the table (Residual of initial model) is not included. The pointer is defined so that the case of the labels is not significant.

Parameter: TERMS.

Action with RESTRICT

Any restriction applied to vectors used in the REML analysis will apply also to the results from VRTRY.

See also

Directives: FIT, REML.
Commands for: REML analysis of linear mixed models.


CAPTION     'VRTRY example',\
            'Example 5.3.6 from The Guide to Genstat, Part 2 Statistics';\
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; \
CLOSE       chan
VCOMPONENTS [FIXED=Littersize+Dose*Sex] RANDOM=Dam/Pup
REML        [PRINT=model,components,wald] Weight
VRFIT       [PRINT=estimates]
VRTRY       [PRINT=changes] Littersize+Sex+Dose
Updated on November 24, 2020

Was this article helpful?