nlme (version 3.1-39)

MEdims: Calculate dimensions in mixed-effects

Description

Calculate the dimensions of various arrays used to represent a mixed-effects model.

Usage

MEdims(groups, ncols)

Arguments

groups
a factor or list of factors describing the grouping of the observations
ncols
a vector of positive integers listing the number of columns in the model matrices at each level of random effects terms or fixed effects

Value

  • a list of dimensions
  • Ntotal number of observations in the original data.
  • ZXrowsnumber of rows in the ZXy array. This can be different from N if the condensed linear model has been decomposed by MEdecomp.
  • ZXcolsnumber of columns in the ZXy array.
  • Qnumber of levels of random effects.
  • StrRowstotal number of rows in the arrays to be stored if conditional estimates of random effects and fixed effects are to be calculated.
  • qveca vector of length Q+2 giving the number of columns in the model matrices for each level of random effects, the fixed effects and the response.
  • ngrpsa vector of length Q giving the number of groups at each level of the random effects.
  • DmOffa vector of length Q giving the offsets into the concatenated relative precision factor arrays.
  • ncolsa vector of length Q giving the number of columns in the model matrices at each level of random effects.
  • nrota vector of length Q+2 giving the number of columns to the right of the current level in the ZXy array that must be rotated in the decomposition.
  • ZXoffa list of vectors of length Q+2 giving the offsets into the ZXy array for the beginning of the model matrix in each group at each level.
  • ZXlena list of vectors of length Q+2 giving the lengths (number of rows) of the model matrix in each group at each level.
  • SToffa list of vectors of length Q+2 giving the offsets into the stored data array for the beginning of the model matrix in each group at each level.
  • DecOffa list of vectors of length Q+2 giving the offsets into the decomposed data array for the beginning of the model matrix in each group at each level. These offsets differ from SToff when there are nested random effects. The DecOff entry for an outer grouping factor points to the beginning of the block and the SToff entry points to the beginning of the last section of the block.
  • DecLena list of vectors of length Q+2 giving the lengths (number of rows) in the block to be decomposed for each group at each level.

See Also

MEestimate