Skip to content

Mixed-effects model with nested factors

2 messages · Manuel Ramon, ONKELINX, Thierry

#
Dear Manuel,

The fixed effect of sp IS estimated. You don't get a p-value because it has no df. You have no df because you used the factor in both the fixed effects as in the random effects. So remove sp from the random effect.

Furthermore, random effect with only a few levels is not a very good idea. You get unreliable estimates of the variance. Have a look at the plot below. It plots the confidence interval for the ratio of the sample variance and the population variance. Note that the interval is very wide with a small number of levels. 6 levels is a minimum minimorum. Ideally you should aim for 30 levels or more.

n <- 2:100
plot(n, qchisq(0.975, n - 1) / (n - 1), type = "l", ylim = c(0, 5.5))
lines(n, qchisq(0.025, n - 1) / (n - 1))
abline(h = 1, lty = 2, col = "red")
abline(v = c(2, 6, 10, 30), lty = 3, col = "blue")

HTH,

Thierry

----------------------------------------------------------------------------
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek
team Biometrie & Kwaliteitszorg
Gaverstraat 4
9500 Geraardsbergen
Belgium

Research Institute for Nature and Forest
team Biometrics & Quality Assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium

tel. + 32 54/436 185
Thierry.Onkelinx at inbo.be
www.inbo.be

To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
Druk dit bericht a.u.b. niet onnodig af.
Please do not print this message unnecessarily.

Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer 
en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is
door een geldig ondertekend document. The views expressed in  this message 
and any annex are purely those of the writer and may not be regarded as stating 
an official position of INBO, as long as the message is not confirmed by a duly 
signed document.