1. Home
  2. VRMETAMODEL procedure


Forms the random model for a REML meta analysis (R.W. Payne).


RANDOM = formula structure Saves the random model
EXPERIMENTSFACTOR = factor Factor defining which units are in each experiment
TERMS = formula Specifies terms, if any, to be fitted over the whole data set; default * i.e. none


EXPERIMENT = scalars, variates or texts Experiments on which additional random terms are to be fitted
formula structures
Random terms that are to be fitted only on the corresponding experiment
SAVEVECTORS = pointers Saves the factors (and/or any variates) defined to represent the local terms on each experiment


In REML meta analyses the designs used in the various experiments need not be identical and, even if they are all the same, the same random model may not be appropriate for every one. REML does allow you to fit different random terms in the different experiments, but their definition can be tedious. For example, if you wanted to include the term Blocks only in experiments 1 and 2 (and with a different variance component in each case), you would need to take two copies of the factor, giving them names (e.g. Blocks1 and Blocks2) that will be recognisable in the output. Then, set Blocks1 to missing except within experiment 1, and Blocks2 to missing except in experiment 2. If you now add Blocks1 + Blocks2 to the overall random model, and set option MVINCLUDE=explanatory in the REML statement, the terms Blocks1 and Blocks2 will each be fitted only in the desired experiment (1 or 2, respectively), and ignored elsewhere. An example is shown in Chapter 2 of the Guide to REML.

The process of forming the modified copies of the factors and devising names to label them clearly on the output can be inconvenient. So procedure VRMETAMODEL has been provided to make this clearer and more straightforward. In the output a term like Reps.Blocks, that is to be fitted only e.g. at Rothamsted, will be labelled


The random model is formed automatically, and can be saved in a formula structure by the RANDOM option. The EXPERIMENTSFACTOR option must specify a factor to indicate which units of the data set belong to each experiment, and the TERMS option can specify random terms that are to be fitted over the whole data set.

The EXPERIMENT parameter lists the experiments where additional random terms are to be fitted, using either the levels or the labels of EXPERIMENTSFACTOR. You can specify a variate or a text with several values, if the terms are to be fitted with the same variance components in more than one experiment.

The LOCALTERMS parameter specifies a formula structure for each experiment to define its additional terms. The factors (and any variates) in the additional terms for each experiment are copied, the required missing values are inserted, and the terms are added to the random model.

By default, the modified copies of the factors and variates that are formed to represent the additional random terms will be unnamed, and exist only as part of the RANDOM model. (The labels that appear in the output are attached to the factors by setting the EXTRA parameter in the FACTOR statement or VARIATE statement that defined them inside VRMETAMODEL.) The SAVEVECTORS parameter allows you to supply a pointer for each experiment, to save its factors (and any variates), so that you use them to refer to the additional random terms e.g. in the VKEEP directive. The elements of each pointer are labelled by the identifiers of the factors or variates in the corresponding local term to simplify their subsequent use.


See also

Procedure: META, VAMETA.
Commands for: REML analysis of linear mixed models.


            'Example from Chapter 2 of Guide to REML.'; STYLE=meta,plain
SPLOAD      [PRINT=*] '%gendir%/data/MetaFungicide.gsh'
" Define additional random terms: block in 1997, block in 1998, 
  and block.wholeplot in 1999."
VRMETA      [TERMS=year*fungicide*cultivar;\
            EXPERIMENTSFACTOR=year; RANDOM=random] 1997,1998,1999;\
VCOMPONENTS [FIXED=fungicide*cultivar; EXPERIMENTS=year] #random
REML        [MVINCLUDE=explanatory] yield
" Save variance components for block in 1998, and block.wholeplot in 1999."
VKEEP       svec[1998]['block']+svec[1999]['block'].svec[1999]['wholeplot'];\
PRINT       vcb1998,vcbw1999
Updated on October 29, 2020

Was this article helpful?