Saves output for a REML
fixed model fitted in a Genstat regression (R.W. Payne).
Options
FACTORIAL = scalar |
Limit for expansion of terms; default 3 |
RESIDUALS = variate |
Residuals, as specified by the RMETHOD option |
FITTEDVALUES = variate |
Fitted values |
RMETHOD = string token |
Type of residuals to form (simple , standardized ); default simp |
RDF = scalar |
Residual degrees of freedom |
RSS = scalar |
Residual sum of squares |
ACCUMULATED = pointer |
Accumulated analysis-of-variance table |
DENOMINATOR = string token |
Whether to base ratios in accumulated summary on rms from model with smallest residual ss or smallest residual ms (ss , ms ); default ss |
Parameters
TERMS = formula |
Terms whose information is to be saved |
ESTIMATES = table, scalar or pointer to tables or scalars |
Estimated regression coefficients for each term |
SE = table, scalar or pointer to tables or scalars |
Standard errors of estimated regression coefficients for each term |
VCOVARIANCE = symmetric matrix or pointer to symmetric matrices |
Variances and covariances between the estimates of each term |
NDF = scalar or pointer to scalars |
Numerator degrees of freedom for each term |
DDF = scalar or pointer to scalars |
Denominator degrees of freedom for each term |
Description
VRKEEP
saves output from models fitted by procedures VRFIT
, VRADD
, VRDROP
, VRSWITCH
and VRTRY
, which are designed to improve the process of determining the appropriate fixed terms to include in a REML
analysis. 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 more details.
The TERMS
parameter specifies terms about which you wish to save information. As in FIT
, the FACTORIAL
option sets a limit on the number of factors and variates in each term. Any term containing more than that limit is deleted. The subsequent parameters allow you to specify identifiers of data structures to store the various types of information for each of the terms that you have specified. The ESTIMATES
parameter saves estimates for each term, in a table if the term involves factors or in a scalar if it involves only variates. Similarly the SE
parameter saves standard errors for the estimates. The VCOVARIANCE
parameter saves the variances and covariances between the estimates of each term, in a symmetric matrix if the term involves factors or in a scalar if it involves only variates. The NDF
and DDF
parameters saves the number of numerator and denominator degrees of freedom for the terms, in scalars. If you have a single term, you can supply a table, scalar or symmetric matrix for each of these parameters, as appropriate. However, if you have several terms, you must supply a pointer which will then be set up to contain as many tables, scalars or symmetric matrices as there are terms.
The RESIDUALS
and FITTEDVALUES
options save the residuals and fitted values, respectively. The RMETHOD
option controls the type of residuals that are formed.
The RDF
and RSS
options save the number of residual degrees of freedom and the residual sum of squares.
The ACCUMULATED
parameter saves the accumulated analysis-of-variance table, as a pointer with elements labelled ‘Change
‘, ‘s.s.
‘, ‘n.d.f
.’, ‘m.s
.’, ‘Wald
‘,’F
‘, ‘Wald pr
.’, ‘d.d.f
.’ and ‘F pr.
‘. The last two elements will contain missing values if the denominator degrees of freedom of the terms could not be estimated in the original REML
analysis. The pointer is defined so that the case of the labels is not significant.
The 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.
Options: FACTORIAL
, RESIDUALS
, FITTEDVALUES
, RMETHOD
, RDF
, RSS
, ACCUMULATED
, DENOMINATOR
.
Parameters: TERMS
, ESTIMATES
, SE
, VCOVARIANCE
, NDF
, DDF
.
See also
Directives: RKEEP
, REML
.
Procedures: VRADD
, VRDISPLAY
, VRDROP
, VRFIT
, VRSETUP
, VRSWITCH
, VRTRY
.
Commands for: REML analysis of linear mixed models.
Example
CAPTION 'VRKEEP 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,accumulated] Littersize+Sex*Dose VRKEEP [ACCUMULATED=accumulated] Littersize+Sex+Dose;\ ESTIMATES=!p(lest,sest,dest); SE=!p(lse,sse,dse);\ DDF=!p(lddf,sddf,dddf) PRINT accumulated[] & lest,lse,lddf & sest,sse & sddf & dest,dse & dddf