pull_resid takes a hierarchical linear model fit as a
lme object and returns various types of level-1 residuals as a
vector. Because the
pull_resid only calculates one type of residual,
it is more efficient than using
hlm_resid and indexing the
pull_resid is designed to be used with methods that
take a long time to run, such as the resampling methods found in the
1 2 3 4 5 6 7 8
an object of class
not in use
which residuals should be returned. Can be either 'ls', 'eb', or 'marginal'
a logical indicating if residuals should be standardized
type = "ls"
Residuals calculated by fitting separate LS
regression models for each group. LS residuals are unconfounded by higher
level residuals, but unreliable for small within-group sample sizes. When
standardize = TRUE, residuals are standardized by sigma components of
the model object.
type = "eb"
Residuals calculated using the empirical Bayes (EB)
method using maximum likelihood. EB residuals are interrelated with higher
level residuals. When
standardize = TRUE, residuals are standardized
by sigma components of the model object.
type = "marginal"
Marginal residuals only consider the fixed
effect portion of the estimates. When
standardize = TRUE, Cholesky
residuals are returned.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.