[R-sig-ME] [R-sig-eco] LRT tests in lmer
Ben Bolker
bbolker at gmail.com
Wed Aug 11 16:31:56 CEST 2010
On 10-08-11 10:21 AM, Chris Mcowen wrote:
> Dear Ben/Rob.
>
>
>> As far as I can tell, the standard advice is simply to look at the predictions of the model, compare them with the data, and try to spot any systematic patterns in the residuals.
>>
>
> I have plotted the residuals of my model - https://files.me.com/chrismcowen/v586vx
>
> I have been made aware that that lmer uses the random effects in its prediction ( Jarrord Hadfield). And this is reflected in the residual plot with the the long lines of equal residuals all belonging to the same family - i.e 200 - 600 is the orchid family and 650-100 is the grass family.
>
> So is there a work around with a glmm?
>
>
>
> Thanks
>
> Chris
>
>
If you want to do population-level predictions from a GLMM (i.e.
setting all random effects to zero), the basic recipe is to (1)
construct a model (design) matrix for the desired sets of predictor
variables (if you want to the predict the observed data rather than some
other set, you can just extract the model matrix from the fitted
object); (2) multiply it by the vector of fixed effect coefficients; (3)
transform it back to the scale of the observations with the inverse link
function. There's an example on p. 6 of
http://glmm.wdfiles.com/local--files/examples/Owls.pdf ...
More information about the R-sig-mixed-models
mailing list