Performs an F-test of random effects in a linear mixed model based on linear combinations of the responses, i.e. an FLC test (V.M. Cave).

`PRINT` = string tokens |
Controls printed output (`summary` , `monitoring` ); default `summ` |

`PLOT` = string tokens |
What graphs to plot for the bootstrap and fast double bootstrap FLC tests (`kerneldensity` , `histogram` ); default * i.e. none |

`TEST` = string tokens |
Type(s) of test to perform; (`flc` , `bootstrap` , `fastdoublebootstrap` ); default `flc` |

`NBOOT` = scalar |
Number of bootstrap samples to take; default 99 |

`SEED` = scalar |
Seed for random number generation; default 0 continues an existing sequence or, if none, selects a seed automatically |

`WINDOW` = scalar |
Window to use for the graphs; default 3 |

`SAVE` = REML save structure |
Specifies the save structure of the original analysis; default is to use the save structure from the most recent `REML` analysis |

### Parameters

`TERMS` = formula |
Random terms to test |

`STATISTIC` = scalar |
Saves the FLC test statistic |

`BOOTSTATISTICS` = variate |
Saves the FLC test statistics from the original data set (i.e. the observed FLC test statistic), and then the bootstrap samples |

`FASTDOUBLE` = pointer |
Pointer to scalars and variates to save the first-level bootstrap probability value and FLC test statistics, and the second-level fast double bootstrap FLC test statistics and resulting critical value |

`PROBABILITIES` = pointer |
Pointer to scalar(s) to save the probability value(s) from the test(s) |

`TITLE` = text |
Title for the graphs |

### Description

The `VFLC`

procedure performs an FLC test to assess whether random terms can be dropped from a linear mixed model, that has been fitted by `REML`

. The FLC test is an F-test based on linear combinations of the responses. `VFLC`

offers the standard FLC test as well its bootstrapped and fast double bootstrapped counterparts.

The original linear mixed model must be fitted using the `REML`

, `VCOMPONENTS`

and `VSTRUCTURE`

directives, in the usual way. The random effects may be correlated, but the model must not contain any spline terms. The `SAVE`

option supplies the save structure from the original analysis; if this is not set, the most recent `REML`

analysis is used. The random term(s) to drop from the original model are defined by a model formula supplied by the `TERMS`

parameter.

The types of FLC test to be performed are specified by the `TEST`

option, with settings `flc`

, `bootstrap`

and `fastdoublebootstrap`

. The default is to use the standard FLC test. For the bootstrap and fast double bootstrap FLC tests, the `NBOOT`

option specifies the number of bootstrap samples to take (default 99), and the `SEED`

option supplies the seed for the random number generator used to generate the bootstrap samples. The default `SEED`

of zero continues the sequence of random numbers from a previous generation or, if this is the first use of the generator in this run of Genstat, it initializes the seed automatically. If you use the same (non-zero) seed more than once, you will get the same random numbers, and hence the same bootstrap samples.

Printed output is controlled by the `PRINT`

option, with the following settings.

`summary`

prints a summary of the test results. For the standard FLC test, this is a table giving the test statistic (i.e. an F-value), its degrees of freedom and corresponding probability value. For the bootstrap and fast double bootstrap FLC tests, this is a table giving the number of bootstrap samples, the seed, the test statistic (i.e. the observed F-value) and the corresponding probability value.

`monitoring`

prints monitoring information, showing the progress of the bootstrapping.

The default is to print the summary.

The `PLOT`

option controls the graphical output from the bootstrap and fast double bootstrap FLC tests, with settings:

`histogram`

to plot a histogram of the bootstrap FLC test statistics, and

`kerneldensity`

to produce a kernel density plot of the bootstrap FLC test statistics.

By default, nothing is plotted. If `TEST=bootstrap`

, the observed FLC test statistic is included in the set of bootstrap FLC test statistics that are plotted. In addition, a reference line is added to indicate where it sits compared to those from the bootstrap samples. Conversely, if `TEST=fastdoublebootstrap`

, the observed FLC test statistic is not included in the set of bootstrap FLC test statistics plotted, and the reference line indicates where the estimated fast double bootstrap critical value, QB, falls. The `WINDOW`

option defines the window to use for the plots; default 3. The `TITLE`

parameter can supply a title for the plots.

Results can be saved using the `STATISTIC`

, `BOOTSTATISTICS`

, `FASTDOUBLE`

and `PROBABILITIES`

parameters. The `STATISTIC`

parameter saves the FLC test statistic in a scalar. The `BOOTSTATISTICS`

parameter saves the bootstrap FLC statistics in a variate, whose first value is the test statistic from the original data set (i.e. the observed FLC test statistic). The `FASTDOUBLE`

parameter saves the results from the fast double bootstrap FLC test in a pointer. The first element of the pointer, labelled ‘`B_FLC pr.`

‘, is a scalar storing the first-level bootstrap probability value. The second element, labelled ‘`B_FLC F`

‘, is a variate storing the first-level bootstrap FLC test statistics. The third element, labelled ‘`FDB_FLC F`

‘, is a variate storing the second-level fast double bootstrap FLC test statistics. The fourth element, labelled ‘`QB`

‘, is a scalar the storing the critical value from the fast double bootstrap FLC test.

Options: `PRINT`

, `PLOT`

, `TEST`

, `NBOOT`

, `SEED`

, `WINDOW`

, `SAVE`

.

Parameters: `TERMS`

, `STATISTIC`

, `BOOTSTATISTICS`

, `FASTDOUBLE`

, `PROBABILITIES`

, `TITLE`

.

### Method

VFLC uses the methods described in Hui et al. (2019) and O’Shaughnessy *et al.* (2018).

### Action with `RESTRICT`

The `REML`

analysis may be restricted in the usual way.

### References

Hui, F.K.C., Müller, S., & Welsh, A.H. (2019). Testing random effects in linear mixed models: another look at the F-test. *Australia & New Zealand Journal of Statistics*, **61**, 61-84.

O’Shaughnessy, P.Y., Hui, F.K.C., Müller, S., & Welsh, A.H. (2018). Bootstrapping F-test for random effects in linear mixed models. arXiv:1812.03428.

### See also

Directives: `REML`

, `VCOMPONENTS`

, `VSTRUCTURE`

Procedures: `VBOOTSTRAP`

, `VRPERMTEST`

.

Commands for: REML analysis of linear mixed models.

### Example

CAPTION 'VFLC example',\ !T('Random coefficient regression: An experiment to study',\ 'the effect of drugs on the growth rates of rats.'),\ !T('Guide to REML in Genstat, Section 4.3.'); \ STYLE=meta,plain,plain SPLOAD [PRINT=*] '%gendir%/data/Boxrat.gsh' "Full model: Linear plus quadratic regression coefficients" CALC timesq = time*time VCOMPONENTS [FIXED=drug*(time+timesq)] RANDOM=rat/(time+timesq) VSTRUCTURE [TERMS=rat/(time+timesq); CORRELATE=unrest; FORM=whole] REML [PRINT=model,components,waldTests] weight "Assessing whether the quadratic effect of time is heterogeneous between rats" VFLC [PLOT=histogram; TEST=flc,bootstrap,fastdouble; SEED=2231225] \ TERMS=rat.timesq