Adds a covariance-structure definition to a `REML`

model-definition structure (R.W. Payne).

### Options

`MODELSTRUCTURE` = pointer |
Supplies the model-definition structure; no default (must be specified) |
---|---|

`EXPERIMENT` = scalar |
Level of the `EXPERIMENTS` factor for which a residual is to be defined (using the `VRESIDUAL` directive) |

`TERMS` = formula |
Model terms for which the covariance structure is to be defined |

`FORMATION` = string token |
Whether the structure is formed by direct product construction or by definition of the whole matrix (`direct` , `whole` ); default `dire` |

`COORDINATES` = identifiers |
Coordinates of the data points to be used in calculating distance-based models (list of variates or matrix) |

### Parameters

`MODELTYPE` = string tokens |
Type of covariance model associated with the term(s), or with individual factors in the term(s) if `FORMATION=direct` (`identity` , `fixed` , `AR` , `MA` , `ARMA` , `power` , `banded` , `correlation` , `antedependence` , `unstructured` , `diagonal` , `uniform` , `FA` , `FAequal` ) default `iden` |
---|---|

`ORDER` = scalar |
Order of model |

`HETEROGENEITY` = string token |
Heterogeneity for correlation matrices (`none` , `outside` ); default `none` |

`METRIC` = string token |
How to calculate distances when `MODELTYPE=power` (`cityblock` , `squared` , `euclidean` ); default `city` |

`FACTOR` = factors |
Factors over which to form direct products |

### Description

`VFSTRUCTURE`

is one of a suite of procedures designed to simplify the assessment of alternative models for a `REML`

analysis. The first step is to form a model-definition structure for each candidate model, using the `VFMODEL`

and the `VFSTRUCTURE`

procedures (these define the model settings controlled by the `VCOMPONENTS`

and the `VSTRUCTURE`

and `VRESIDUAL`

directives, respectively). The model-definition structures can then be used as input to procedures like `VARANDOM`

, which assesses possible random models. `VARANDOM`

uses `VMODEL`

to specify each model, in turn, so that it can fit it using `REML`

. The relevant results from each fit are saved by the `VRACCUMULATE`

procedure, so that a decision about the recommended random model can be made once they have all been tried.

The model-definition structure must be specified by the `MODELDEFINITION`

option. Details of the model are specified by the `TERMS`

, `FORMATION`

, `COORDINATES`

and `EXPERIMENT`

options, and the `MODELTYPE`

, `ORDER`

, `HETEROGENEITY`

, `METRIC`

, and `FACTOR`

parameters (which correspond to those options and parameters in the `VSTRUCTURE`

and `VRESIDUAL`

directives). If the `EXPERIMENT`

option is not set, the specification will be used in a `VSTRUCTURE`

statement within `VMODEL`

. The `EXPERIMENT`

option is relevant if you have used the `EXPERIMENTS`

option in the original `VFMODEL`

statement to define the experiments factor for a meta analysis. You can then set `EXPERIMENT`

to a level of that factor to define a residual model for that experiment, using a `VRESIDUAL`

statement within `VMODEL`

.

Options: `MODELSTRUCTURE`

, `EXPERIMENT`

, `TERMS`

, `FORMATION`

, `COORDINATES`

.

Parameters: `MODELTYPE`

, `ORDER`

, `HETEROGENEITY`

, `METRIC`

, `FACTOR`

.

### See also

Directives: `REML`

, `VCOMPONENTS`

, `VSTRUCTURE`

.

Procedures: `VARANDOM`

, `VFMODEL`

, `VMODEL`

.

Commands for: REML analysis of linear mixed models.

### Example

CAPTION 'VFSTRUCTURE example',\ 'Slate Hall Farm data (Guide to REML in Genstat, Section 1.8).';\ STYLE=meta,plain SPLOAD '%gendir%/data/slatehall.gsh' " define an Ar1 (x) Ar1 covariance model " VFMODEL [MODELSTRUCTURE=AR1xAR1; DESCRIPTION='Ar1 (x) AR1';\ FIXED=variety] fieldrow.fieldcolumn VFSTRUCTURE [MODELSTRUCTURE=AR1xAR1; TERMS=fieldrow.fieldcolumn]\ 2('AR'); ORDER=1; FACTOR=fieldrow,fieldcolumn VMODEL AR1xAR1 REML [PRINT=model,components,wald] yield