Skip to content

mixed effect model: compare seed families

4 messages · Dunbar, Michael, Zoltan Botta-Dukat, ONKELINX, Thierry

#
Hi Zoltan

Possibly plot and source site are crossed. ie (1|plot) + (1|site) in lmer (not nlme)

There would then be no problem in having fixed effects corresponding to sites and properties of individuals. As site is random, you can test sand vs clay, but a test of residual differences between sites is tested by comparing models with and without the site random effect. If you just want to test this within sand then just fit the models to the sand site data, but you then many be running short of replication?

You don't mention your response variable, is each individual measured more than once, of not then you can't specify an individual as random as there is no replication within it.

regards

Mike
1 day later
#
Hi,

Thanks to Mike and Thierry for suggestions. The key points were that the 
random factors are crossed, and it can be analysed by lmer.

I've done the analysis, and the results considerably differ from which 
I've get without including random factors.

It was strange for me that lmer calculate t-statistic for each parameter 
estimates, but it does not show neither df nor p-value.

For example (from the help of lmer):

 > (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
Linear mixed model fit by REML
Formula: Reaction ~ Days + (Days | Subject)
   Data: sleepstudy
  AIC  BIC logLik deviance REMLdev
 1756 1775 -871.8     1752    1744
Random effects:
 Groups   Name        Variance Std.Dev. Corr 
 Subject  (Intercept) 612.092  24.7405       
          Days         35.072   5.9221  0.066
 Residual             654.941  25.5918       
Number of obs: 180, groups: Subject, 18

Fixed effects:
            Estimate Std. Error t value
(Intercept)  251.405      6.825   36.84
Days          10.467      1.546    6.77

Correlation of Fixed Effects:
     (Intr)
Days -0.138

I could test factors only by comparing two models using anova function 
that calculates ML-Chisq (I tried the test="F" parameter, but it did not 
influence the result). I hope it is correct.

Thanks again, and best wishes

Zoltan


Dunbar, Michael ?rta:
#
Dear Zoltan,

lmer not displaying p-values is FAQ 7.35 (http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-are-p_002dvalues-not-displayed-when-using-lmer_0028_0029_003f)

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

-----Oorspronkelijk bericht-----
Van: Zoltan Botta-Dukat [mailto:bdz at botanika.hu] 
Verzonden: donderdag 21 januari 2010 9:30
Aan: Dunbar, Michael
CC: r-sig-ecology at r-project.org; ONKELINX, Thierry
Onderwerp: Re: [R-sig-eco] FW: mixed effect model: compare seed families

Hi,

Thanks to Mike and Thierry for suggestions. The key points were that the random factors are crossed, and it can be analysed by lmer.

I've done the analysis, and the results considerably differ from which I've get without including random factors.

It was strange for me that lmer calculate t-statistic for each parameter estimates, but it does not show neither df nor p-value.

For example (from the help of lmer):

 > (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)) Linear mixed model fit by REML
Formula: Reaction ~ Days + (Days | Subject)
   Data: sleepstudy
  AIC  BIC logLik deviance REMLdev
 1756 1775 -871.8     1752    1744
Random effects:
 Groups   Name        Variance Std.Dev. Corr
 Subject  (Intercept) 612.092  24.7405       
          Days         35.072   5.9221  0.066
 Residual             654.941  25.5918       
Number of obs: 180, groups: Subject, 18

Fixed effects:
            Estimate Std. Error t value
(Intercept)  251.405      6.825   36.84
Days          10.467      1.546    6.77

Correlation of Fixed Effects:
     (Intr)
Days -0.138

I could test factors only by comparing two models using anova function that calculates ML-Chisq (I tried the test="F" parameter, but it did not influence the result). I hope it is correct.

Thanks again, and best wishes

Zoltan


Dunbar, Michael ?rta:
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.
#
To test fixed effects you can do anova or AIC comparisons or parametric bootstrap to compare two nested models (all using ML rather than REML). 
regards
Mike


-----Original Message-----
From: ONKELINX, Thierry [mailto:Thierry.ONKELINX at inbo.be] 
Sent: 21 January 2010 09:17
To: Zoltan Botta-Dukat; Dunbar, Michael
Cc: r-sig-ecology at r-project.org
Subject: RE: [R-sig-eco] FW: mixed effect model: compare seed families

Dear Zoltan,

lmer not displaying p-values is FAQ 7.35 (http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-are-p_002dvalues-not-displayed-when-using-lmer_0028_0029_003f)

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

-----Oorspronkelijk bericht-----
Van: Zoltan Botta-Dukat [mailto:bdz at botanika.hu] 
Verzonden: donderdag 21 januari 2010 9:30
Aan: Dunbar, Michael
CC: r-sig-ecology at r-project.org; ONKELINX, Thierry
Onderwerp: Re: [R-sig-eco] FW: mixed effect model: compare seed families

Hi,

Thanks to Mike and Thierry for suggestions. The key points were that the random factors are crossed, and it can be analysed by lmer.

I've done the analysis, and the results considerably differ from which I've get without including random factors.

It was strange for me that lmer calculate t-statistic for each parameter estimates, but it does not show neither df nor p-value.

For example (from the help of lmer):

 > (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)) Linear mixed model fit by REML
Formula: Reaction ~ Days + (Days | Subject)
   Data: sleepstudy
  AIC  BIC logLik deviance REMLdev
 1756 1775 -871.8     1752    1744
Random effects:
 Groups   Name        Variance Std.Dev. Corr 
 Subject  (Intercept) 612.092  24.7405       
          Days         35.072   5.9221  0.066
 Residual             654.941  25.5918       
Number of obs: 180, groups: Subject, 18

Fixed effects:
            Estimate Std. Error t value
(Intercept)  251.405      6.825   36.84
Days          10.467      1.546    6.77

Correlation of Fixed Effects:
     (Intr)
Days -0.138

I could test factors only by comparing two models using anova function that calculates ML-Chisq (I tried the test="F" parameter, but it did not influence the result). I hope it is correct.

Thanks again, and best wishes

Zoltan


Dunbar, Michael ?rta:
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.