Learn R Programming

nlmm (version 1.1.1)

predict.nlmm: Predictions from an nlmm Object

Description

The predictions at level 0 correspond to predictions based only on the fixed effects estimates. The predictions at level 1 are obtained by adding the best linear predictions of the random effects to the predictions at level 0.

Usage

# S3 method for nlmm
predict(object, level = 0, ...)

Value

a vector of predictions.

Arguments

object

an nlmm object.

level

an integer vector giving the level of grouping to be used in obtaining the predictions.

...

not used.

Author

Marco Geraci

References

Geraci, M. and Farcomeni A. (2020). A family of linear mixed-effects models using the generalized Laplace distribution. Statistical Methods in Medical Research, 29(9), 2665-2682.

See Also

nlmm, ranef.nlmm, fixef.nlmm

Examples

Run this code
if (FALSE) {
data(rats)
fit <- nlmm(y ~ trt*time, random = ~ 1, group = id, data = rats,
control = nlmmControl(multistart = FALSE))

# Individual growth trajectories
predict(fit, level = 1)
}

Run the code above in your browser using DataLab