1. Home
2. VAIC procedure

# VAIC procedure

Calculates the Akaike and Schwarz (Bayesian) information coefficients for `REML` (R.W. Payne & V.M.Cave).

### Options

`PRINT` = string tokens Controls printed output (`deviance`, `aic`, `bic`, `sic`, `dffixed`, `dfrandom`, `changes`); default `aic` When `LMETHOD=residual` which constants to include that depend only on the fixed model (`determinant`, `pi`); default `pi` Method to use to calculate log(determinant(X′X)) (`choleski`, `lrv`); default `chol` Whether the residual or full log-likelihood is used to calculate the information coefficients (`residual`, `full`); default `resi` Whether to repeat output from the previous `VAIC` (`yes, no`); default `no`

### Parameters

`DEVIANCE` = scalars Saves the deviance Saves the Akaike information coefficient Saves the Schwarz (Bayesian) information coefficient Saves the number of parameters fitted in the fixed model Saves the number of parameters fitted in the random model (and any covariance models) Saves changes since the previous `VAIC`; the units of the variates are labelled by the names of the coefficients (deviance, `aic`, `sic`, `dffixed` and `dfrandom`) Save structure for which to calculate the coefficients; default uses the save structure from the most recent `REML`

### Description

The Akaike and Schwarz (Bayesian) information coefficients are often used to compare the fit of models. Traditionally the residual log-likelihood is used to form the information coefficients, and these can be used to assess the appropriateness of random (and covariance) models in `REML`. However, for `REML` models with different fixed effects, the residual log-likelihoods are not comparable and hence information coefficients derived from the residual log-likelihood cannot be used. To compare models that differ in their fixed effects, information coefficients formed using the full log-likelihood evaluated at the `REML` estimates must be used. The `LMETHOD` option is thus provided to control whether the information coefficients are formed using the residual log-likelihood (the default) or the full log-likelihood.
When `LMETHOD=residual`, the information coefficients are calculated from the `REML` deviance:

aic = deviance + 2 × r
sic = deviance + log(np) × r

where n is the total number of usable units in the analysis, r is the number of parameters fitted in the random model (and any covariance models), and p is the number of parameters fitted in the fixed model.

An additional consideration is that the `REML` deviance omits some constants that depend on the fixed model. In fact the full deviance is given by

full deviance = deviance + (np)*log(2π) – log(det(X′X))

where X is the design matrix of the fixed model. Other software systems tend to include the first term, involving π, but omit the log-determinant term which is more time-consuming to calculate. The inclusion of these terms in the calculation is controlled by the `INCLUDE` option, with settings

    `determinant` -log(det(X′X)) +(n-p)*log(2π)

The `DMETHOD` option controls how -log(det(X′X)) is calculated when this is included. However, the default is `INCLUDE=pi`.

When `LMETHOD=full`, the information coefficients are calculated by:

aic = deviance + 2 × (r + p) + logdet
sic = deviance + log(n ) × (r + p) + logdet

where logdet is the log-determinant of the variance-covariance matrix for the full set of fixed and random effects. See Verbyla (2019) for more details. The options `INCLUDE` and `DMETHOD` are not relevant, and are ignored.

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

    `deviance` prints the deviance (adding the extra terms specified by `INCLUDE` when `LMETHOD=residual`); prints the Akaike information coefficient; print the Schwarz (Bayesian) information coefficient; prints the number of parameters fitted in the fixed model; prints the number of parameters fitted in the random model (and any covariance models); prints changes in the values of the coefficients since the previous use of `VAIC`, (provided the fixed model of the `REML` analysis has not also changed `LMETHOD=residual`)

These can all be saved using the `DEVIANCE`, `AIC`, `SIC`, `DFFIXED`, `DFRANDOM` and `CHANGES` parameters. By default `VAIC` prints just the Akaike information coefficient.

By default, each time that you use `VAIC`, its record of the current and previous `REML` analyses is updated. However, you can set option `REPEAT=yes` to repeat output from the previous `VAIC`. The analysis record is then not updated, so the information required to calculate changes remains available.

The coefficients are usually calculated for the most recent `REML` analysis. However, you can use the `SAVE` parameter to specify the save structure from an earlier analysis.

Options: `PRINT`, `INCLUDE`, `DMETHOD`, `LMETHOD`, `REPEAT`.
Parameters: `DEVIANCE`, `AIC`, `SIC`, `DFFIXED`, `DFRANDOM`, `CHANGES`, `SAVE`.

### References

Verbyla, A.P. (2019). A note on model selection using information criteria for general linear models estimated using REML. Australia & New Zealand Journal of Statistics, 61, 39-50.

Directives:  `REML`, `VKEEP`.
Procedure: `VRACCUMULATE`.
Commands for: REML analysis of linear mixed models.

### Example

```CAPTION     'VAIC 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
C   M   12    1    1   6.60
C   M   12    1    2   7.40
C   M   12    1    3   7.15
C   M   12    1    4   7.24
C   M   12    1    5   7.10
C   M   12    1    6   6.04
C   M   12    1    7   6.98
C   M   12    1    8   7.05
C   F   12    1    9   6.95
C   F   12    1   10   6.29
C   F   12    1   11   6.77
C   F   12    1   12   6.57
C   M   14    2    1   6.37
C   M   14    2    2   6.37
C   M   14    2    3   6.90
C   M   14    2    4   6.34
C   M   14    2    5   6.50
C   M   14    2    6   6.10
C   M   14    2    7   6.44
C   M   14    2    8   6.94
C   M   14    2    9   6.41
C   F   14    2   10   5.92
C   F   14    2   11   6.04
C   F   14    2   12   5.82
C   F   14    2   13   6.04
C   F   14    2   14   5.96
C   M    4    3    1   7.50
C   M    4    3    2   7.08
C   F    4    3    3   7.57
C   F    4    3    4   7.27
C   M   14    4    1   6.25
C   M   14    4    2   6.93
C   M   14    4    3   6.80
C   M   14    4    4   6.69
C   M   14    4    5   6.28
C   M   14    4    6   6.27
C   M   14    4    7   6.27
C   M   14    4    8   6.47
C   F   14    4    9   6.29
C   F   14    4   10   5.98
C   F   14    4   11   6.32
C   F   14    4   12   6.28
C   F   14    4   13   5.65
C   F   14    4   14   5.57
C   M   13    5    1   7.96
C   M   13    5    2   6.84
C   M   13    5    3   7.00
C   M   13    5    4   8.10
C   M   13    5    5   6.52
C   M   13    5    6   7.23
C   M   13    5    7   6.10
C   M   13    5    8   7.31
C   F   13    5    9   7.16
C   F   13    5   10   7.09
C   F   13    5   11   7.14
C   F   13    5   12   5.02
C   F   13    5   13   6.04
C   M    9    6    1   8.26
C   M    9    6    2   7.73
C   M    9    6    3   8.33
C   M    9    6    4   6.14
C   M    9    6    5   7.75
C   M    9    6    6   6.96
C   F    9    6    7   7.26
C   F    9    6    8   6.58
C   F    9    6    9   3.68
C   M   18    7    1   6.29
C   M   18    7    2   6.32
C   M   18    7    3   6.28
C   M   18    7    4   6.24
C   M   18    7    5   6.78
C   M   18    7    6   6.63
C   M   18    7    7   6.27
C   M   18    7    8   6.29
C   M   18    7    9   6.06
C   F   18    7   10   6.16
C   F   18    7   11   5.96
C   F   18    7   12   6.26
C   F   18    7   13   5.83
C   F   18    7   14   6.11
C   F   18    7   15   6.45
C   F   18    7   16   6.25
C   F   18    7   17   6.31
C   F   18    7   18   5.74
C   M   17    8    1   6.04
C   M   17    8    2   5.84
C   M   17    8    3   6.77
C   M   17    8    4   5.59
C   M   17    8    5   5.52
C   M   17    8    6   6.42
C   M   17    8    7   5.97
C   M   17    8    8   6.34
C   F   17    8    9   6.23
C   F   17    8   10   5.95
C   F   17    8   11   6.16
C   F   17    8   12   6.19
C   F   17    8   13   5.32
C   F   17    8   14   5.00
C   F   17    8   15   6.30
C   F   17    8   16   5.00
C   F   17    8   17   5.56
C   M   17    9    1   5.37
C   M   17    9    2   5.58
C   M   17    9    3   5.51
C   M   17    9    4   5.19
C   M   17    9    5   5.34
C   M   17    9    6   5.77
C   M   17    9    7   5.17
C   M   17    9    8   4.57
C   M   17    9    9   5.39
C   M   17    9   10   5.62
C   M   17    9   11   5.40
C   M   17    9   12   5.77
C   M   17    9   13   5.24
C   F   17    9   14   5.37
C   F   17    9   15   5.33
C   F   17    9   16   5.44
C   F   17    9   17   5.14
C   M   13   10    1   7.30
C   M   13   10    2   6.60
C   M   13   10    3   6.58
C   M   13   10    4   6.68
C   M   13   10    5   6.46
C   M   13   10    6   6.38
C   F   13   10    7   6.44
C   F   13   10    8   6.67
C   F   13   10    9   6.43
C   F   13   10   10   6.53
C   F   13   10   11   5.92
C   F   13   10   12   6.52
C   F   13   10   13   6.44
Low   M   16   11    1   6.65
Low   M   16   11    2   5.78
Low   M   16   11    3   6.23
Low   M   16   11    4   5.70
Low   M   16   11    5   5.73
Low   M   16   11    6   6.10
Low   M   16   11    7   5.55
Low   M   16   11    8   5.71
Low   M   16   11    9   5.81
Low   M   16   11   10   6.10
Low   F   16   11   11   5.54
Low   F   16   11   12   5.72
Low   F   16   11   13   5.50
Low   F   16   11   14   5.64
Low   F   16   11   15   5.42
Low   F   16   11   16   5.42
Low   F    2   12    1   6.89
Low   F    2   12    2   7.73
Low   M   12   13    1   5.83
Low   M   12   13    2   5.97
Low   M   12   13    3   6.39
Low   M   12   13    4   5.69
Low   M   12   13    5   5.69
Low   M   12   13    6   5.97
Low   M   12   13    7   6.04
Low   M   12   13    8   5.46
Low   F   12   13    9   6.09
Low   F   12   13   10   5.39
Low   F   12   13   11   5.89
Low   F   12   13   12   5.14
Low   M   15   14    1   5.92
Low   M   15   14    2   5.75
Low   M   15   14    3   6.22
Low   M   15   14    4   5.96
Low   M   15   14    5   5.59
Low   M   15   14    6   5.79
Low   M   15   14    7   6.23
Low   M   15   14    8   5.88
Low   M   15   14    9   6.02
Low   F   15   14   10   5.66
Low   F   15   14   11   5.76
Low   F   15   14   12   5.73
Low   F   15   14   13   5.33
Low   F   15   14   14   5.58
Low   F   15   14   15   5.88
Low   M   13   15    1   6.00
Low   M   13   15    2   6.11
Low   M   13   15    3   6.40
Low   M   13   15    4   6.06
Low   M   13   15    5   6.39
Low   M   13   15    6   6.09
Low   M   13   15    7   6.32
Low   F   13   15    8   5.96
Low   F   13   15    9   6.32
Low   F   13   15   10   5.83
Low   F   13   15   11   5.97
Low   F   13   15   12   5.87
Low   F   13   15   13   5.67
Low   M   13   16    1   6.43
Low   M   13   16    2   6.13
Low   M   13   16    3   5.87
Low   F   13   16    4   6.09
Low   F   13   16    5   5.63
Low   F   13   16    6   5.84
Low   F   13   16    7   6.20
Low   F   13   16    8   6.42
Low   F   13   16    9   5.90
Low   F   13   16   10   5.62
Low   F   13   16   11   6.23
Low   F   13   16   12   5.85
Low   F   13   16   13   5.89
Low   M   14   17    1   5.81
Low   M   14   17    2   5.44
Low   M   14   17    3   5.65
Low   M   14   17    4   5.25
Low   M   14   17    5   5.45
Low   M   14   17    6   5.32
Low   M   14   17    7   5.89
Low   F   14   17    8   5.63
Low   F   14   17    9   5.12
Low   F   14   17   10   5.65
Low   F   14   17   11   5.29
Low   F   14   17   12   5.13
Low   F   14   17   13   5.60
Low   F   14   17   14   5.08
Low   M   15   18    1   6.77
Low   M   15   18    2   7.13
Low   M   15   18    3   6.85
Low   F   15   18    4   6.49
Low   F   15   18    5   6.09
Low   F   15   18    6   6.09
Low   F   15   18    7   5.99
Low   F   15   18    8   6.01
Low   F   15   18    9   6.11
Low   F   15   18   10   6.15
Low   F   15   18   11   4.75
Low   F   15   18   12   5.69
Low   F   15   18   13   6.19
Low   F   15   18   14   5.72
Low   F   15   18   15   6.14
Low   M   10   19    1   6.72
Low   M   10   19    2   6.34
Low   M   10   19    3   6.48
Low   M   10   19    4   5.74
Low   F   10   19    5   6.11
Low   F   10   19    6   5.71
Low   F   10   19    7   6.41
Low   F   10   19    8   6.21
Low   F   10   19    9   6.11
Low   F   10   19   10   5.81
Low   M   16   20    1   5.90
Low   M   16   20    2   6.22
Low   M   16   20    3   6.67
Low   M   16   20    4   6.23
Low   M   16   20    5   6.24
Low   M   16   20    6   6.26
Low   M   16   20    7   6.38
Low   M   16   20    8   6.05
Low   M   16   20    9   5.89
Low   M   16   20   10   6.29
Low   F   16   20   11   6.12
Low   F   16   20   12   5.40
Low   F   16   20   13   5.50
Low   F   16   20   14   5.46
Low   F   16   20   15   5.97
Low   F   16   20   16   6.11
High   M   14   21    1   5.09
High   M   14   21    2   5.57
High   M   14   21    3   5.69
High   M   14   21    4   5.50
High   M   14   21    5   5.45
High   M   14   21    6   5.24
High   M   14   21    7   5.36
High   M   14   21    8   5.26
High   M   14   21    9   5.36
High   M   14   21   10   5.01
High   M   14   21   11   5.03
High   F   14   21   12   5.23
High   F   14   21   13   5.13
High   F   14   21   14   4.48
High   M   10   22    1   5.30
High   M   10   22    2   5.40
High   M   10   22    3   5.55
High   M   10   22    4   6.02
High   M   10   22    5   5.27
High   F   10   22    6   5.19
High   F   10   22    7   5.42
High   F   10   22    8   5.40
High   F   10   22    9   5.12
High   F   10   22   10   5.40
High   M    3   23    1   7.70
High   F    3   23    2   7.68
High   F    3   23    3   6.33
High   M   12   24    1   6.28
High   M   12   24    2   5.74
High   M   12   24    3   6.29
High   F   12   24    4   5.68
High   F   12   24    5   5.76
High   F   12   24    6   6.03
High   F   12   24    7   5.30
High   F   12   24    8   5.55
High   F   12   24    9   6.53
High   F   12   24   10   5.76
High   F   12   24   11   5.77
High   F   12   24   12   5.49
High   M    8   25    1   6.50
High   M    8   25    2   7.10
High   M    8   25    3   7.00
High   M    8   25    4   7.00
High   M    8   25    5   5.85
High   F    8   25    6   6.10
High   F    8   25    7   6.63
High   F    8   25    8   6.33
High   M    9   26    1   7.00
High   M    9   26    2   6.15
High   F    9   26    3   6.22
High   F    9   26    4   6.20
High   F    9   26    5   5.76
High   F    9   26    6   6.21
High   F    9   26    7   6.42
High   F    9   26    8   6.42
High   F    9   26    9   6.30
High   M    9   27    1   5.64
High   M    9   27    2   6.06
High   M    9   27    3   6.56
High   M    9   27    4   6.29
High   M    9   27    5   5.69
High   M    9   27    6   6.36
High   F    9   27    7   5.93
High   F    9   27    8   5.74
High   F    9   27    9   5.74 :
VCOMPONENTS [FIXED=Littersize+Dose*Sex] RANDOM=Dam/Pup
REML        [PRINT=model,components,wald] Weight
VAIC
```
Updated on October 28, 2020