Description Usage Arguments Details Value References
View source: R/residual_functions.R
Calculates marginal residuals of lmerMod
and lme
model objects.
1 2 3 4 5 6 7 8 | ## Default S3 method:
resid_marginal(object, type)
## S3 method for class 'lmerMod'
resid_marginal(object, type = c("raw", "pearson", "studentized", "cholesky"))
## S3 method for class 'lme'
resid_marginal(object, type = c("raw", "pearson", "studentized", "cholesky"))
|
object |
an object of class |
type |
a character string specifying what type of residuals should be calculated.
It is set to |
For a model of the form Y = X β + Z b + ε, four types of marginal residuals can be calculated:
raw
r = Y - X \hat{beta}
pearson
r / √{ diag(\hat{Var}(Y)})
studentized
r / √{ diag(\hat{Var}(r)})
cholesky
\hat{C}^{-1} r where \hat{C}\hat{C}^\prime = \hat{Var}(Y)
A vector of marginal residuals.
Singer, J. M., Rocha, F. M. M., & Nobre, J. S. (2017). Graphical Tools for Detecting Departures from Linear Mixed Model Assumptions and Some Remedial Measures. International Statistical Review, 85, 290–324.
Schabenberger, O. (2004) Mixed Model Influence Diagnostics, in Proceedings of the Twenty-Ninth SAS Users Group International Conference, SAS Users Group International.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.