| getReStruc | R Documentation |
Calculate random effect structure Calculates number of random effects, number of parameters, block size and number of blocks. Mostly for internal use.
getReStruc(
reTrms,
ss = NULL,
aa = NULL,
reXterms = NULL,
fr = NULL,
full_cor = NULL
)
reTrms |
random-effects terms list |
ss |
a vector of character strings indicating a valid covariance structure (one for each RE term).
Must be one of |
aa |
additional arguments (i.e. rank, or var-cov matrix) |
reXterms |
terms objects corresponding to each RE term |
fr |
model frame |
full_cor |
compute full correlation matrices? can be either a length-1 logical vector (TRUE/FALSE) to include full correlation matrices for all or none of the random-effect terms in the model, or a logical vector with length equal to the number of correlation matrices, to include/exclude correlation matrices individually |
a list
blockNumTheta |
number of variance covariance parameters per term |
blockSize |
size (dimension) of one block |
blockReps |
number of times the blocks are repeated (levels) |
covCode |
structure code |
simCode |
simulation code; should we "zero" (set to zero/ignore), "fix" (set to existing parameter values), "random" (draw new random deviations)? |
fullCor |
logical vector (compute/store full correlation matrix?) |
data(sleepstudy, package="lme4")
rt <- lme4::lFormula(Reaction~Days+(1|Subject)+(0+Days|Subject),
sleepstudy)$reTrms
rt2 <- lme4::lFormula(Reaction~Days+(Days|Subject),
sleepstudy)$reTrms
getReStruc(rt)
getReStruc(rt2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.