Description Usage Arguments Details Value Author(s) See Also Examples
Assuming a mixed-effects model of form y_fit = Xb + Zu + e, where X is the model matrix for fixed effects, Z is the model matrix for random effects, and b and u are the fixed and random effects respectively, this function returns these components per each fitted value y. These may be useful for model inference and/or diagnostic purposes.
1 | mem.getcomp(fit)
|
fit |
A fitted mixed-effects model generated either through the lme4 or the nlme package. |
Notice that per-observation model error is e = Xb + Zu - y_observation. Similarly, the components Xb and Zu are extracted.
The function returns per-observation model fit components for a mixed-effects model. The return fields are
Xb |
Fixed effects component Xb |
Zu |
Random effects component Zu |
XbZu |
Full model fit by summing the above two Xb+Zu |
e |
Model error e |
y |
Original observations y |
Teemu Daniel Laajala <teelaa@utu.fi>
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.