powered by
Generate individual random effects from a multivariate normal distribution.
generateETA(n, omegaLT, omega = LTmat(omegaLT), eta.names = sprintf("ETA%d", 1:nrow(omega)))
The number of individuals.
A numeric vector giving the elements of the lower triangle of the covariance matrix by row.
The covariance matrix.
A character vector of names for each random effect.
An \(n \times p\) matrix, where each row contains the vector of random effects for one individual (\(p\) is the size of the covariance matrix).
LTmat blockdiag
LTmat
blockdiag
# NOT RUN { omegaLT <- c(0.123, 0.045, 0.678) generateETA(10, omegaLT) # }
Run the code above in your browser using DataLab