[R-sig-eco] Strange residual behaviour in hierarchical or binary data in lmer.

Chris Mcowen chrismcowen at gmail.com
Fri Aug 6 10:20:35 CEST 2010


Dear list.

Sorry for posting twice in such quick succession, i am new to modelling and my data set is proving to be trouble!

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 my question is what can be done about this if anything? How can i estimate the confidence of my model -when ( hopefully) i come to publish this work will i not need to justify the model with data from the residual plot?

Furthermore, do i need to use data from the residuals to use it as a predictive model?


Thanks

Chris

See below for details of data - 



> str(traits)
'data.frame':	1116 obs. of  63 variables:
 $ order          : Factor w/ 9 levels "Alismatales",..: 1 1 1 1 1 1 1 1 1 1 ...
 $ family         : Factor w/ 42 levels "Agavaceae","Alliaceae",..: 7 7 7 7 7 7 7 7 7 7 ...
 $ genus          : Factor w/ 449 levels "Acanthochlamys",..: 18 18 24 28 28 28 41 41 41 41 ...
 $ species        : Factor w/ 1065 levels "abdulrahmanii",..: 338 385 86 556 600 684 417 465 592 597 ...
 $ lifeform       : int  1 1 1 1 1 1 1 1 1 1 ...
 $ geophyte       : int  1 1 1 1 1 1 1 1 1 1 ...
 $ breedingsystem : int  3 3 3 3 3 3 3 1 1 1 ...
 $ pollendispersal: int  1 1 1 1 1 1 1 1 1 1 ...
 $ fruit          : int  1 1 1 1 1 1 1 1 1 1 ...
 $ habit          : int  1 1 1 1 1 1 1 1 1 1 ...
 $ woodyness      : int  1 1 2 2 2 2 2 2 2 2 ...
 $ l2regions      : int  1 1 1 1 8 1 3 1 1 1 ...
 $ seasonality    : int  2 2 2 2 2 2 2 2 2 2 ...
 $ floralsymmetry : int  2 2 1 1 1 1 1 1 1 1 ...
 $ endosperm      : int  1 1 1 0 0 0 1 1 1 1 ...
 $ threatornot    : int  1 0 1 0 0 1 1 1 0 0 ...

table(table(family))

1   2   3   4   5   6   7   8   9  10  11  13  14  22  29  51  57  78
7   5   5   1   3   3   2   1   1   1   2   2   1   1   1   1   1   1
111 232 490
1   1   1
table(table(order))

5  14  20  44  51  57 464 567
1   1   2   1   1   1   1   1
table(table(genus))

1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  17  19  20
283  81  30  28  12  11   8   5   2   3   2   2   2   1   4   1   2   1
23  35  46
1   1   1
table(table(species))

 1    2    3    4
1102   62    4    1


More information about the R-sig-ecology mailing list