hlm_augment {HLMdiag} | R Documentation |
Calculating residuals and influence diagnostics for HLMs
hlm_augment
is used to compute residuals, fitted values, and influence diagnostics for a
hierarchical linear model. The residuals and fitted values are computed using Least Squares(LS)
and Empirical Bayes (EB) methods. The influence diagnostics are computed through one step
approximations.
Description
Calculating residuals and influence diagnostics for HLMs
hlm_augment
is used to compute residuals, fitted values, and influence diagnostics for a
hierarchical linear model. The residuals and fitted values are computed using Least Squares(LS)
and Empirical Bayes (EB) methods. The influence diagnostics are computed through one step
approximations.
Usage
hlm_augment(object, ...)
## Default S3 method:
hlm_augment(object, ...)
## S3 method for class 'lmerMod'
hlm_augment(object, level = 1, include.ls = TRUE, data = NULL, ...)
Arguments
object |
an object of class |
... |
currently not used |
level |
which residuals should be extracted and what cases should be deleted for influence diagnostics.
If |
include.ls |
a logical indicating if LS residuals should be included in the
return tibble. |
data |
the original data frame passed to 'lmer'. This is only necessary for 'lmerMod' models where 'na.action = "na.exclude"' |
Details
The hlm_augment
function combines functionality from hlm_resid
and hlm_influence
for a simpler way of obtaining residuals and influence
diagnostics. Please see ?hlm_resid
and ?hlm_influence
for additional information
about the returned values.
Note
hlm_augment
does not allow for the deletion of specific cases, the specification of other
types of leverage, or the use of full refits of the model instead of one step approximations for influence
diagnostics. If this additional functionality is desired, hlm_influence
should be used instead. The additional
parameter standardize
is available in hlm_resid
; if this are desired, hlm_resid
should be used instead.