[R-sig-eco] FW: mixed effect model: compare seed families
Zoltan Botta-Dukat
bdz at botanika.hu
Thu Jan 21 09:30:26 CET 2010
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:
> 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
>
>
> ________________________________________
> From: r-sig-ecology-bounces at r-project.org [r-sig-ecology-bounces at r-project.org] On Behalf Of Zoltan Botta-Dukat [bdz at botanika.hu]
> Sent: 18 January 2010 19:26
> To: r-sig-ecology at r-project.org
> Subject: [R-sig-eco] mixed effect model: compare seed families
>
> Hi everyone,
>
> I'm struggling with evaluation an experiment for maternal effect and
> plasticity.
>
> We have grown offsprings of 64 individuals (seed families) in a common
> garden experiment. There was 8 replicate plots, in each plot one
> individual from each seed family.
> Seeds come from 8 different sites, and 8 seed families collected in each
> site. Sites belong to two groups according to soil type: sand and clay.
> In each site 4 large and 4 small mother plant were chosen.
>
> We would like to test:
> - difference between soil types
> - difference between mother size categories
> - interaction between soil type and mother size
> - difference between sites within a soil type (In fact we are interested
> in differences between sites in sand only, because the common garden was
> on sand, and one site is situated in its neighbour).
>
> It is clear that soil_type and mother_size are fix factors.
> I suspect that both plot and seed_family should be random factor, but
> I'm not sure what is the correct specification. Maybe
> random=~1|plot/seed_family. It's OK?
> Can I include the comparison between sites into this model? Or would be
> better to make a separate analysis using seed families from sand only?
>
> Thanks for the suggestions
>
> Zoltan
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
>
More information about the R-sig-ecology
mailing list