An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20140520/3945d220/attachment.pl>
Assessing Normality for Mixed Models
7 messages · Lionel, Emmanuel Curis, Chris Howden +2 more
Hi Jacob, You should do similar normality check as you would do for linear models, I usually use the qqplot, you can use qqnorm(resid(model)) and qqline(resid(model)). Then another assumptions from linear mixed models is that the random effect are normally distributed with a mean of 0, you can use qqnorm(unlist(model)) and qqline(unlist(model)) if you have only one random term. So two things should be normally distributed in linear mixed models: the residuals and the random effects. When you have a low number of level in the random effects normality will in some case not be reached just due to the small number of levels, I am not aware of ways to account for this, I would either include the random effect as fixed effect or use simulation. Sincerely yours, Lionel
On 20/05/2014 20:59, AvianResearchDivision wrote:
Hi All, After doing some extensive googling, searching for ways to assess normality for linear mixed models, I can honestly say my head is swimming in different proposed techniques that may or may not be valid. Also, when reading the literature, I find that few studies that use linear mixed models and random regression actually explicitly address how they assess normality. What are the rules with normality with mixed models (if there are any) and what are your techniques to assess normality? Any input that you can provide would be great and hopefully we help to settle my mind on this issue. Thank you, Jacob [[alternative HTML version deleted]]
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
Sorry forgot one function in the code for the check of random effect normality: qqnorm(unlist(ranef(model))) qqline(unlist(ranef(model))) Lionel
On 20/05/2014 21:25, Lionel wrote:
Hi Jacob, You should do similar normality check as you would do for linear models, I usually use the qqplot, you can use qqnorm(resid(model)) and qqline(resid(model)). Then another assumptions from linear mixed models is that the random effect are normally distributed with a mean of 0, you can use qqnorm(unlist(ranef(model))) and qqline(unlist(ranef(model))) if you have only one random term. So two things should be normally distributed in linear mixed models: the residuals and the random effects. When you have a low number of level in the random effects normality will in some case not be reached just due to the small number of levels, I am not aware of ways to account for this, I would either include the random effect as fixed effect or use simulation. Sincerely yours, Lionel On 20/05/2014 20:59, AvianResearchDivision wrote:
Hi All,
After doing some extensive googling, searching for ways to assess
normality
for linear mixed models, I can honestly say my head is swimming in
different proposed techniques that may or may not be valid. Also, when
reading the literature, I find that few studies that use linear mixed
models and random regression actually explicitly address how they assess
normality. What are the rules with normality with mixed models (if
there
are any) and what are your techniques to assess normality? Any input
that
you can provide would be great and hopefully we help to settle my
mind on
this issue.
Thank you,
Jacob
[[alternative HTML version deleted]]
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
Hi All,
I give here a tentative response, and would be happy to be corrected
by more experimented statisticians.
When using the Y = X %*% theta + X' %*% Z + epsilon model, where Z is
the random effects matrix and epsilon the residuals, the aim is, with
the random part, to reproduce the covariance matrix of Y starting with
Z and epsilon.
A first assumption is that Z and epsilon are (multivariate) normally
distributed. A second assumption is that Z and epsilon are independant.
However, the decomposition of Y covariance matrix between X' %*% Z and
epsilon can be done in several ways, ranging from X' %*% Z = 0 and
everything is in the epsilon part --- this is the gls approach in
nlme, if I understood it correctly ---, to epsilon is iid (as in usual
linear model) and X' %*% Z explains everything else. And everything
inbetween can be wrote, with some classical kinds of matrices
(? compound symmetry ? and so on). This corresponds to the G and R
parts of the (random effects) model using SAS vocabulary [not quite
sure of the two letters right now, sorry]. Hence, other assumptions
and what exactly mean ? normally distributed ? will depend on the
exact model you write.
In lme4, the model is that epsilon is iid, and everything is in the
X'%*%Z part, which is a one-dimension Gaussian in the simplest case of
a single random effect (and no interaction with fixed effects either),
and multidimensionnal Gaussian otherwise, with a covariance matrix
depending on the exact model formula for the random part.
In (n)lme, you can have more flexibility on both random effects and
residual parts, so more combinations are possible.
So, with lme4, checks would be
- residuals are normal
==> qqplot of residuals
- residuals are independant
==> autocorrelation or (ei, ei+1) plots
- residuals are homoscedastic
==> residuals = f( fixed effects) plots
(keeping in mind that observed residuals are not independant,
nor normally distributed)
here, the situation is very similar to the linear model case,
except that I'm not sure that (externally) studentized residuals
follow a known distribution to improve check quality...
- random effects are _multi-dimensionnal_ normals
which is more difficult to assess ; marginal normality of each
column of the matrix of random effects is necessary but not
sufficient.
here also, observed randoms effects are not normally distributed,
and not independant, which means one cannot be too strict when
graphically assessing normality
- random effects and residuals are independant
not quite sure, but I guess a ranef() ~ residuals() plot should
give a hint?
For nlme, since both epsilon and random effects can be
multi-dimensionnal, for both of them we are in the second case.
The frontier between model assumption and model building is not so
clear either, at least for me: if you assume homoscedasticity of
random effects between groups, it is a model assumption to be checked,
but it can be checked by comparing it to an heteroscedastic model...
Hope this help,
PS : I've found a lot of things about ? sphericity ? assumptions and
things like that, but I'm not sure how general it is, or only to be
considered when trying to build F-tests, my impression is that it is
only for F-tests.
PS-2 : I am currently working on scripts that try to help checking
such assumptions, both for LM and LMM, leading to an HTML report for
the user; if anyone wants to help me in that development or testing,
please feel free to contact me.
On Tue, May 20, 2014 at 02:59:28PM -0400, AvianResearchDivision wrote:
? Hi All, ? ? After doing some extensive googling, searching for ways to assess normality ? for linear mixed models, I can honestly say my head is swimming in ? different proposed techniques that may or may not be valid. Also, when ? reading the literature, I find that few studies that use linear mixed ? models and random regression actually explicitly address how they assess ? normality. What are the rules with normality with mixed models (if there ? are any) and what are your techniques to assess normality? Any input that ? you can provide would be great and hopefully we help to settle my mind on ? this issue. ? ? Thank you, ? Jacob ? ? [[alternative HTML version deleted]] ? ? _______________________________________________ ? R-sig-mixed-models at r-project.org mailing list ? https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
Emmanuel CURIS
emmanuel.curis at parisdescartes.fr
Page WWW: http://emmanuel.curis.online.fr/index.html
They may not be addressing normality since we don?t always expect the residuals to be normal e.g. if we are doing a GLMM with a Poisson or binomial error distribution. Chris Howden B.Sc. (Hons) GStat. Founding Partner Evidence Based Strategic Development, IP Commercialisation and Innovation, Data Analysis, Modelling and Training (mobile) 0410 689 945 (skype) chris.howden chris at trickysolutions.com.au Disclaimer: The information in this email and any attachments to it are confidential and may contain legally privileged information.?If you are not the named or intended recipient, please delete this communication and contact us immediately.?Please note you are not authorised to copy, use or disclose this communication or any attachments without our consent. Although this email has been checked by anti-virus software, there is a risk that email messages may be corrupted or infected by viruses or other interferences. No responsibility is accepted for such interference. Unless expressly stated, the views of the writer are not those of the company. Tricky Solutions always does our best to provide accurate forecasts and analyses based on the data supplied, however it is possible that some important predictors were not included in the data sent to us. Information provided by us should not be solely relied upon when making decisions and clients should use their own judgement. -----Original Message----- From: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of AvianResearchDivision Sent: Wednesday, 21 May 2014 4:59 AM To: r-sig-mixed-models at r-project.org Subject: [R-sig-ME] Assessing Normality for Mixed Models Hi All, After doing some extensive googling, searching for ways to assess normality for linear mixed models, I can honestly say my head is swimming in different proposed techniques that may or may not be valid. Also, when reading the literature, I find that few studies that use linear mixed models and random regression actually explicitly address how they assess normality. What are the rules with normality with mixed models (if there are any) and what are your techniques to assess normality? Any input that you can provide would be great and hopefully we help to settle my mind on this issue. Thank you, Jacob _______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
There could be, of course, normality or otherwise at multiple levels of variation. Also I would think the importance of normality (versus perhaps just not too heavy-tailed?) could depend on the inferences one wants to make. David -----Original Message----- From: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of Chris Howden Sent: Tuesday, May 20, 2014 10:13 PM To: AvianResearchDivision; r-sig-mixed-models at r-project.org Subject: Re: [R-sig-ME] Assessing Normality for Mixed Models They may not be addressing normality since we don?t always expect the residuals to be normal e.g. if we are doing a GLMM with a Poisson or binomial error distribution. Chris Howden B.Sc. (Hons) GStat. Founding Partner Evidence Based Strategic Development, IP Commercialisation and Innovation, Data Analysis, Modelling and Training (mobile) 0410 689 945 (skype) chris.howden chris at trickysolutions.com.au Disclaimer: The information in this email and any attachments to it are confidential and may contain legally privileged information.?If you are not the named or intended recipient, please delete this communication and contact us immediately.?Please note you are not authorised to copy, use or disclose this communication or any attachments without our consent. Although this email has been checked by anti-virus software, there is a risk that email messages may be corrupted or infected by viruses or other interferences. No responsibility is accepted for such interference. Unless expressly stated, the views of the writer are not those of the company. Tricky Solutions always does our best to provide accurate forecasts and analyses based on the data supplied, however it is possible that some important predictors were not included in the data sent to us. Information provided by us should not be solely relied upon when making decisions and clients should use their own judgement. -----Original Message----- From: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of AvianResearchDivision Sent: Wednesday, 21 May 2014 4:59 AM To: r-sig-mixed-models at r-project.org Subject: [R-sig-ME] Assessing Normality for Mixed Models Hi All, After doing some extensive googling, searching for ways to assess normality for linear mixed models, I can honestly say my head is swimming in different proposed techniques that may or may not be valid. Also, when reading the literature, I find that few studies that use linear mixed models and random regression actually explicitly address how they assess normality. What are the rules with normality with mixed models (if there are any) and what are your techniques to assess normality? Any input that you can provide would be great and hopefully we help to settle my mind on this issue. Thank you, Jacob _______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models _______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20140521/5af342a7/attachment.pl>