reStruct-class {lme4} | R Documentation

## Class "reStruct"

### Description

The random-effects model structure in a linear mixed-effects model or a generalized linear mixed-effects model or a nonlinear mixed-effects model.

### Objects from the Class

Objects can be created by calls of the form `new("reStruct", ...)`.

### Slots

`random`:
  A `"list"` of `lmeLevel` objects giving the levels of random effects in the model, the fixed-effects, and the response or the working residual.
`fixed`:
  The `"formula"` of the response and fixed-effects terms.
`offset`:
  `"numeric"`: the offset in the model, if present.
`dirtyDecomposed`:
  `"logical"`: if `TRUE` the decomposed matrix must be recalculated.
`useWeighted`:
  `"logical"`: if `TRUE` calculate and use the weighted model matrix to form the decompositions; otherwise use the original model matrix.
`dirtyStored`:
  `"logical"`: if `TRUE` the matrix of stored decompositions must be recalculated.
`dirtyBbetas`:
  `"logical"`: if `TRUE` the BLUP's and the conditional estimates of the fixed-effects must be recalculated.
`logLik`:
  `"numeric"`: the log-likelihood at the current parameter values.
`REML`:
  `"logical"`: if `TRUE` the parameters will be estimated according to the REML criterion
`analyticHessian`:
  `"logical"`: if `TRUE` the `hessianArray` slot of the lmeLevel objects are calculated during optimization.
`reverseOrder`:
  `"integer"`: the permutation of the rows that provides the original order.
`origOrder`:
  `"integer"`: the inverse of the `reverseOrder` permutation.
`original`:
  `"matrix"`: the original model matrix, including the original response in the last column.
`weighted`:
  `"matrix"`: the model matrix and responses after applying weights.
`stored`:
  `"matrix"`: a model matrix of intermediate decomposition results needed for evaluating the BLUPs and the EM or ECME iterations.
`decomposed`:
  `"matrix"`: the model matrix after predecomposition. This generally has many few rows than `original`.
`bbetas`:
  `"numeric"`: the BLUPs and the conditional estimates of the fixed-effects parameters at the current values of the relative precision matrices.
`dontCopy`:
  `"logical"`: if `TRUE` it indicates that this object has just been created and is only assigned to one name. In these circumstances changes are made directly on the object without copying. This is dangerous. You probably don't want to modify this setting.
`assign.X`:
  Object of class `"ANY"`: the `assign` attribute from the model matrix for the fixed effects.

### Methods

EMsteps<-
  `signature(x = "reStruct", value = "list")`: perform the EM iterations
LMEgradient
  `signature(x = "reStruct", A = "missing", nlev = "missing")`: evaluate the gradient of the linear mixed-effects profiled log-likelihood.
LMEoptimize<-
  `signature(x = "reStruct", value = "list")`: Optimize with `optim` or `nlm`.
VarCorr
  `signature(x = "reStruct")`: Extract the variances and covariances of the random effects.
coef
  `signature(object = "reStruct")`: return the current parameters in the object.
coef<-
  `signature(object = "reStruct", value = "numeric")`: assign the parameters to the object.
fitted
  `signature(object = "reStruct")`: extract the fitted values.
fixef
  `signature(object = "reStruct")`: extract the fixed effects.
fixef<-
  `signature(object = "reStruct", value = "numeric")`: assign the fixed effects.
getFixDF
  `signature(object = "reStruct")`: extract the denominator degrees of freedom for the fixed-effects terms.
getGroups
  `signature(object = "reStruct", form = "missing", level = "ANY", data = "missing", sep = "missing")`: return the grouping factors for the random effects
getResponse
  `signature(object = "reStruct")`: extract the response.
logLik
  `signature(object = "reStruct")`: return the log-likelihood at the current parameter values.
model.matrix
  `signature(object = "reStruct")`: return the model matrix for the object.
model.matrix<-
  `signature(x = "reStruct", value = "matrix")`: assign the model matrix to the object.
ranef
  `signature(object = "reStruct")`: extract the random effects predictors.
response<-
  `signature(x = "reStruct", value = "numeric")`: set the working response (used in GLMM models).
summary
  `signature(object = "reStruct")`: summarize the object.
weighted<-
  `signature(x = "reStruct", value = "matrix")`: update the weights.

### Examples

[Package Contents]