1. Home
  2. VAYPARALLEL procedure

VAYPARALLEL procedure

Does the same REML analysis for several y-variates, and collates the output (R.W. Payne).

Options

PRINT = string tokens Controls printed output (summary, monitoring); default * i.e. none
MODELDEFINITION = pointer Defines the model for the analysis
FSAVETERMS = formula Fixed terms for which to save information; if this is not set, information is saved for all the fixed terms
RSAVETERMS = formula Random terms for which to save information; if this is not set, no information is saved for the random terms
RECOVER = string token Whether to try to recover with a simpler random model if REML cannot fit the model for a particular y-variate (yes, no); default no
METHOD = string token How to choose the best model during recovery (aic, sic, bic); default sic
SPREADSHEET = string tokens What results to save in spreadsheets (components, fixedtests, means, vcmeans, effects, vceffects, residuals, fittedvalues); default * i.e. none
SHEETLAYOUT = string token How to store the results in spreadsheets (yrows, ycolumns, onesheet); default ycol

Parameters

Y = pointers Y-variates for the analyses
RESIDUALS = matrices Saves the residuals
FITTEDVALUES = matrices Saves the fitted values
COMPONENTS = matrices Saves the variance components
MEANS = pointers Pointer to a matrix for each of the terms in FSAVETERMS, saving the predicted means
VCMEANS = pointers Pointer to matrices saving variances and covariances for the means
EFFECTS = pointers Pointer to matrices saving effects for the terms in FSAVETERMS and RSAVETERMS
VCEFFECTS = pointers Pointer to matrices saving variances and covariances for the effects
WALD = matrices Saves the Wald statistics for the terms in FSAVETERMS
FSTATISTIC = matrices Saves the F statistics for the terms in FSAVETERMS
NDF = matrices Saves the numerator degrees of freedom for the terms in FSAVETERMS
DDF = matrices Saves the denominator degrees of freedom for the terms in FSAVETERMS
PRFIXED = matrices Saves the probabilities for the F statistics if available, or otherwise the Wald statistics, for the terms in FSAVETERMS
EXIT = pointers Pointer to scalars saving the exit codes from the initial REML analyses
OUTFILENAME = texts Name of Genstat workbook file (.gwb) or Excel (.xls or .xlsx) file to create

Description

The VAYPARALLEL procedure does a “parallel” REML analysis of variance for several y-variates, combining and summarizing the information from all the analyses. The MODELDEFINITION option defines the model to be fitted in the analyses. This must be constructed beforehand, using the VFMODEL and VFSTRUCTURE procedures.

Printed output is controlled by the PRINT option, with settings:

    monitoring to print a running total of the number of analyses that have been analysed, and
    summary to print a summary of the significance levels found for the analyses for each of the SAVETERMS.

The SPREADSHEET option allows you to save various output components in spreadsheets. By default, these are opened within Genstat. However, you can set the OUTFILENAME parameter to save them in a Genstat workbook (.gwb) or an Excel spreadsheet (.xls or .xlsx). If the name supplied by OUTFILENAME is specified without a suffix, '.gwb' is added (so that a Genstat workbook is saved).

The FSAVETERMS and RSAVETERMS options specify the fixed terms and random terms, respectively, whose information is to be saved. By default, information is saved for all the fixed terms and none of the random terms.

The SHEETLAYOUT option controls how the output is stored in the spreadsheet. By default, the various components are stored in separate pages, with a different column for each y-variate. Setting SHEETLAYOUT=yrows still has the components in separate pages, but the output is transposed so that there is a row for each y-variate. Setting SHEETLAYOUT=onesheet also transposes the output, but the components are now put into a single page.

The Y parameter supplies a pointer, containing the y-variates for the analyses. The RESIDUALS, FITTEDVALUES, MEANS, VCMEANS, EFFECTS, VCEFFECTS, WALD, FSTATISTIC, NDF, DDF and PRFIXED parameters allow you to save output components in Genstat data structures. The identifiers of the data structures are also used to identify the corresponding components, if saved in spreadsheets.

The RESIDUALS and FITTEDVALUES parameters save the residuals and fitted values, respectively. By default, these will each be in a matrix, with a column for each y-variate. The matrix is transposed, so that there is now a row for each y-variate, when SHEETLAYOUT is set to yrows or onesheet.

The MEANS parameter saves tables of predicted means for fixed effects. The information is stored in a pointer with a matrix for each of the terms in the formula supplied by the FSAVETERMS option. By default, the matrices have a column for each y-variate, and the rows are labelled to show how they correspond to the cells of the table. The matrices are transposed, when SHEETLAYOUT is set to yrows or onesheet. Similarly VCMEANS parameter saves the variances and covariances of the means.

The EFFECTS parameter saves effects for fixed and random terms. The information is stored in a pointer with a matrix for each of the terms in the FSAVETERMS and RSAVETERMS formulae. The layout of the matrices is controlled by the SHEETLAYOUT option, in the same way as the matrices of means. The VCEFFECTS parameter saves variances and covariances for the effects.

Parameters WALD, FSTATISTIC, NDF, DDF and PRFIXED store information from the corresponding columns of the tables of tests for fixed effects. By default, these are in matrices with a column for each y-variate, and a row for each fixed term. The matrices are transposed, when SHEETLAYOUT is set to yrows or onesheet.

If there are more random terms than are actually needed to explain the random variation, REML may be unable to achieve a successful fit. (The REML likelihood may be too flat for any clear optimum to be found.) You can guard against this situation by setting option RECOVER=yes. Then, if this happens for a particular y-variate, VAYPARALLEL tries models removing first one random term (and any associated spatial model), then two, and so on until successful. The EXIT parameter allows you to save a pointer, with scalars containing the exit codes from the original REML analyses, so that you can see which y-variates required recovery.

The METHOD option specifies how to choose the random (and spatial) model if there is more than one possible model with the same number of random terms removed:

    aic uses their Akaike information coefficients,
    sic or bic uses their Schwarz (Bayesian) information coefficients (default).

Options: PRINT, MODELDEFINITION, FSAVETERMS, RSAVETERMS, RECOVER, METHOD, SPREADSHEET, SHEETLAYOUT.

Parameters: Y, RESIDUALS, FITTEDVALUES, MEANS, VCMEANS, EFFECTS, VCEFFECTS, WALD, FSTATISTIC, NDF, DDF, PRFIXED, EXIT, OUTFILENAME.

Method

The analyses are performed by the REML directive. The VARECOVER procedure is used to recover from unsuccessful fits.

Action with RESTRICT

Any restrictions on the y-variates will be removed.

See also

Directive: REML.

Procedures: AYPARALLEL, RYPARALLEL.

Commands for: REML analysis of linear mixed models.

Example

CAPTION     'VAYPARALLEL example'
VARIATE     [NVALUES=9] AB011264,AB011266,AB019525
READ        AB011264
4.2 5.1 11.6 3 3.9 9.3 3.3 4.4 10 :
READ        AB011266
12.5 3 8.8 8.7 2.3 7.1 10.3 2.5 6.9 :
READ        AB019525
1.5 6.2 8.9 1.3 4.5 7.7 1.3 5.1 7 :
FACTOR      [LEVELS=3; VALUES=(1...3)3] Reps
FACTOR      [LEVELS=!(0,1,2); ; VALUES=3(0...2)] Times
VFMODEL     [MODELSTRUCTURE=vmodel; DESCRIPTION='vayparallel example';\
            FIXED=Times] Reps/Times
VAYPARALLEL [PRINT=monitoring,summary; MODELDEFINITION=vmodel]\
            !p(AB011264,AB011266,AB019525);\
            RESIDUALS=residuals; FITTEDVALUES=fittedvals;\
            WALD=wald; FSTATISTIC=fstat; NDF=ndf; DDF=ddf; PRFIXED=pr;\
            EFFECTS=effects; VCEFFECTS=vceffects; MEANS=means; VCMEANS=vcmeans
PRINT       #wald,#fstat,#ndf,#ddf,#pr
&           residuals,fittedvals
&           [SERIAL=yes] effects[],vceffects[],means[],vcmeans[]
Updated on June 17, 2019

Was this article helpful?