generateETA: Generate individual random effects from a multivariate normal...

Description Usage Arguments Value See Also Examples

View source: R/linpk.R

Description

Generate individual random effects from a multivariate normal distribution.

Usage

1
2
generateETA(n, omegaLT, omega = LTmat(omegaLT),
  eta.names = sprintf("ETA%d", 1:nrow(omega)))

Arguments

n

The number of individuals.

omegaLT

A numeric vector giving the elements of the lower triangle of the covariance matrix by row.

omega

The covariance matrix.

eta.names

A character vector of names for each random effect.

Value

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).

See Also

LTmat blockdiag

Examples

1
2
omegaLT <- c(0.123, 0.045, 0.678)
generateETA(10, omegaLT)

linpk documentation built on June 12, 2018, 5:04 p.m.