[R-sig-ME] Worked analysis of owl data

Greg Snow Greg.Snow at imail.org
Fri Aug 13 19:52:27 CEST 2010


One suggestion for looking at the residual plots is to simulate data that matches your underlying model (and all the assumptions that you want to check with the residual plots are true), then discretize the response into the 5 levels, run the regression and look at the residual plot when the assumptions are true.  Do this a few times, then compare the residual plot from your actual data to see if it looks different.  The vis.test function in the TeachingDemos package can help with the comparisons if you want.

For what you hope to do with this model, a Bayesian approach may work better, you can explicitly model the underlying continuous variable and the rule to convert that to the 5 level variable.  Predicting outcomes or probabilities of outcomes for the next individual (observed species or new species) is then natural for Bayesian models.

Just don't tell my Bayesian friends that I recommend this, I hate it when they get all smug.

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----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 Mcowen
> Sent: Friday, August 13, 2010 1:27 AM
> To: Ben Bolker; Jarrod Hadfield
> Cc: R-mixed models mailing list
> Subject: Re: [R-sig-ME] Worked analysis of owl data
> 
> Hi Jarrord/Ben and list
> 
> Thanks for this.
> 
> I have extended the model to a gaussian error with 5 level response
> variable (IUCN- 1-5) this is a as discrete variable but is an
> approximation of an underlying continuous spectrum.
> 
> The reason i am worrying about the residuals ( please follow link to a
> new picture - https://files.me.com/chrismcowen/0v6ys4)
> 
>  Is that i want to use the fitted values from the model to predict
> extinction risk ( the response variable) - that way i could include
> species that don't have a extinction risk, species that weren't in the
> original model, but for which i have all the necessary life history
> data. However i am unsure if this is possible with lmer?
> 
> I hope this makes sense, and thank you for your help
> 
> Chris
> 
> 
> On 12 Aug 2010, at 18:47, Jarrod Hadfield wrote:
> 
> Hi Ben/Chris,
> 
> I agree and would not be unduly worried about the residuals from a
> binary model. They always look odd if you are used to looking at
> residuals from a Guassian model, and I'm not sure whether its possible
> to diagnose problems using them (except complete separation perhaps).
> 
> Cheers,
> 
> Jarrod
> 
> 
> On 12 Aug 2010, at 16:41, Ben Bolker wrote:
> 
> > On Thu, Aug 12, 2010 at 5:24 AM, Chris Mcowen <cm744 at st-
> andrews.ac.uk> wrote:
> >> Hi Ben,
> >>
> >> I have been working through the above data set
> >>
> >> I have followed the code to NOT account for random effects in my
> model,  which has worked well - thanks, however as i have a binary
> response my residual plot shows this
> >>
> >> https://files.me.com/chrismcowen/i4jxlw
> >>
> >> Is there a way to Plot predictions and confidence intervals with
> residuals like this?
> >
> > Why not?  The recipes in the Owls example should work, I think ...
> > with the proviso that (as Jarrod Hadfield said) you have to be very
> > careful in defining what response you are predicting the mean _of_ --
> > if there are any random effects (other than the intrinsic variability
> > of the binary response) that are non-zero, and if you try to
> calculate
> > the mean of the predicted response on the original (rather than the
> > link/logit scale), they will affect the prediction of the mean.
> >
> > You seem quite concerned about the odd distributions of the
> > residuals. It's good to be careful, but as far I have seen so far
> what
> > you are seeing is just the nature of binary residuals.  One way to
> get
> > a handle on what the residuals should look like is to simulate data
> > from a situation reasonably similar to (although often a bit simpler
> > than) what you think is going on with your data, so that you *know*
> > the model is specified correctly, and see what the residuals from the
> > fitted model look like in that case.
> >
> 
> 
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models




More information about the R-sig-mixed-models mailing list