Learn R Programming

CLME (version 2.0-4)

clme: Constrained Inference for Linear Mixed Effects Models

Description

Constrained inference for linear fixed or mixed effects models using distribution-free bootstrap methodology

Usage

clme(formula, data, gfix = NULL, constraints = list(), tsf = lrt.stat, tsf.ind = w.stat.ind, mySolver = "LS", verbose = c(FALSE, FALSE, FALSE), levels = NULL, ncon = 1, ...)

Arguments

formula
a formula expression. The constrained effect(s) must come before any unconstrained covariates on the right-hand side of the expression. The first ncon terms will be assumed to be constrained.
data
data frame containing the variables in the model.
gfix
optional vector of group levels for residual variances. Data should be sorted by this value.
constraints
optional list containing the constraints. See Details for further information.
tsf
function to calculate the test statistic.
tsf.ind
function to calculate the test statistic for individual constrats. See Details for further information.
mySolver
solver to use in isotonization (passed to activeSet).
verbose
optional. Vector of 3 logicals. The first causes printing of iteration step, the second two are passed as the verbose argument to the functions minque and clme_em, respectively.
levels
optional list to manually specify names for constrained coefficients. See Details.
ncon
the number of variables in formula that are constrained.
...
space for additional arguments.

Value

The output of clme is an object of the class clme, which is list with elements:
  • theta estimates of $theta$ coefficients
  • theta estimates of $theta_0$ coefficients under the null hypothesis
  • ssq estimate of residual variance(s), $sigma.i^2$.
  • tsq estimate of random effects variance component(s), $tau.i^2$.
  • cov.theta the unconstrained covariance matrix of $theta$
  • ts.glb test statistic for the global hypothesis.
  • ts.ind test statistics for each of the constraints.
  • mySolver the solver used for isotonization.
  • constraints list containing the constraints (A) and the contrast for the global test (B).
  • dframe data frame containing the variables in the model.
  • residuals matrix containing residuals. For mixed models three types of residuals are given.
  • random.effects estimates of random effects.
  • gfix group sample sizes for residual variances.
  • gran group sizes for random effect variance components.
  • gfix_group group names for residual variances.
  • formula the formula used in the model.
  • call the function call.
  • order list describing the specified or estimated constraints.
  • P1 the number of constrained parameters.
  • nsim the number of bootstrap simulations used for inference.
OrderPlot.jpgPlot of Orders.

Details

If any random effects are included, the function computes MINQUE estimates of variance components. After, clme_em is run to obtain the observed values. If nsim>0, a bootstrap test is performed using resid_boot. For the argument levels the first list element should be the column index (in data) of the constrained effect. The second element should be the true order of the levels.

Examples

Run this code
data( rat.blood )
cons <- list(order="simple", decreasing=FALSE, node=1 )

clme.out <- clme(mcv ~ time + temp + sex + (1|id), data=rat.blood ,
                 constraints=cons, seed=42, nsim=10, ncon=1)

Run the code above in your browser using DataLab