[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-sig-mixed-models
Subject:    [R-sig-ME] types of residuals in lme4
From:       Burcu Darst via R-sig-mixed-models <r-sig-mixed-models () r-project ! org>
Date:       2018-06-12 18:34:59
Message-ID: 5534C6A7-D374-43D9-B015-5AEA226CCAD3 () wisc ! edu
[Download RAW message or body]

I am using lme4 to get residuals from a model that has two random intercepts, as \
shown below:

test = lmer(continuousOutcome ~ age + sex + (1|DBID) + (1|familyID), data, na.action \
= na.exclude)


I've tried extracting all of the following types of residuals, but the only \
differences I observe between these approaches are due to scaling (i.e., residuals do \
not differ by residual type).

resids = as.data.table(residuals(test,type = "pearson", scaled = TRUE))
resids = as.data.table(residuals(test,type = "working", scaled = TRUE))
resids = as.data.table(residuals(test,type = "response", scaled = TRUE))
resids = as.data.table(residuals(test,type = "deviance", scaled = TRUE))
resids = as.data.table(residuals(test,type = "pearson"))
resids = as.data.table(residuals(test,type = "working"))
resids = as.data.table(residuals(test,type = "response"))
resids = as.data.table(residuals(test,type = "deviance"))


Is this an expected result when using lme4 to obtain residuals from mixed models? I \
want to ensure that the residuals I am obtaining are individual level (which they \
appear to be) and that they account for the two random intercepts (which I believe \
they do, since they differ if I exclude one of the random intercepts).


	[[alternative HTML version deleted]]

_______________________________________________
R-sig-mixed-models@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic