Description Usage Arguments Details Value Author(s) References See Also Examples
These functions simulate values from the (exact) finite sample distribution
of the (restricted) likelihood ratio statistic for testing the presence of
the variance component (and restrictions of the fixed effects) in a simple
linear mixed model with known correlation structure of the random effect and
i.i.d. errors. They are usually called by exactLRT
or
exactRLRT
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
X |
The fixed effects design matrix of the model under the alternative |
Z |
The random effects design matrix of the model under the alternative |
q |
The number of parameters restrictions on the fixed effects (see Details) |
sqrt.Sigma |
The upper triangular Cholesky factor of the correlation matrix of the random effect |
seed |
Specify a seed for |
nsim |
Number of values to simulate |
log.grid.hi |
Lower value of the grid on the log scale. See Details |
log.grid.lo |
Lower value of the grid on the log scale. See Details |
gridlength |
Length of the grid for the grid search over lambda. See Details |
parallel |
The type of parallel operation to be used (if any). If missing, the default is "no parallelization"). |
ncpus |
integer: number of processes to be used in parallel operation: typically one would chose this to the number of available CPUs. Defaults to 1, i.e., no parallelization. |
cl |
An optional parallel or snow cluster for use if parallel = "snow". If not supplied, a cluster on the local machine is created for the duration of the call. |
The model under the alternative must be a linear mixed model
y=X*beta+Z*b+epsilon with a single random
effect b with known correlation structure Sigma and i.i.d errors.
The simulated distribution of the likelihood ratio statistic was derived by
Crainiceanu & Ruppert (2004). The simulation algorithm uses a grid search over
a log-regular grid of values of
lambda=Var(b)/Var(epsilon) to
maximize the likelihood under the alternative for nsim
realizations of
y drawn under the null hypothesis. log.grid.hi
and
log.grid.lo
are the lower and upper limits of this grid on the log
scale. gridlength
is the number of points on the grid.\ These are just
wrapper functions for the underlying C code.
A vector containing the the simulated values of the (R)LRT under the null, with attribute 'lambda' giving \arg\min(f(λ)) (see Crainiceanu, Ruppert (2004)) for the simulations.
Fabian Scheipl; parallelization code adapted from boot
package
Crainiceanu, C. and Ruppert, D. (2004) Likelihood ratio tests in linear mixed models with one variance component, Journal of the Royal Statistical Society: Series B,66,165–185.
Scheipl, F. (2007) Testing for nonparametric terms and random effects in structured additive regression. Diploma thesis (unpublished).
Scheipl, F., Greven, S. and Kuechenhoff, H (2008) Size and power of tests for a zero random effect variance or polynomial regression in additive and linear mixed models, Computational Statistics & Data Analysis, 52(7):3283-3299
1 2 3 4 5 6 7 8 9 10 11 12 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.