Mixed effects model where nested factor is not the repeated across treatments lme???
Hi Miki and Chunhao,
<< Rusers (Anna, and Mark {thank you guys}) provide me a vary valuable
<< information.
Also see Gavin Simpson's posting earlier today: apparently multcomp does now
work with lmer objects (it's gone through phases of not working, then
working: it's still being developed). Beware, though, that random effects
are specified differently, so it's not as easy to recast an aov(... +
Error(...)) term structure as an equivalent random effect's structure.
HTH, Mark.
ctu wrote:
Hi Miki,
I just got the same problem with you couple hours ago.
Rusers (Anna, and Mark {thank you guys}) provide me a vary valuable
information.
link to following address.
http://www.nabble.com/Tukey-HSD-(or-other-post-hoc-tests)-following-repeated-measures-ANOVA-td17508294.html#a17559307
for the A vs. B, A vs. C....
You could install and download the multcomp package and perform the
post hoc test
such as
summary(glht(lmel,linfct=mcp(treatment="Tukey")))
hopefully it helps
Chunhao
Quoting M Ensbey <m.ensbey at unimelb.edu.au>:
Hi, I have searched the archives and can't quite confirm the answer to this. I appreciate your time... I have 4 treatments (fixed) and I would like to know if there is a significant difference in metal volume (metal) between the treatments. The experiment has 5 blocks (random) in each treatment and no block is repeated across treatments. Within each plot there are varying numbers of replicates (random) (some plots have 4 individuals in them some have 14 and a range in between). NOTE the plots in one treatment are not replicated in the others. So I end up with a data.frame with 4 treatments repeated down one column (treatment=A, B, C, D), 20 plots repeated down the next (block= 1 to 20) and records for metal volume (metal- 124 of these) I have made treatment and block a factor. But haven't grouped them (do I need to and how if so) The main question is in 3 parts: 1. is this the correct formula to use for this situation: lme1<-lme(metal~treatment,data=data,random=~1|block) (or is lme even the right thing to use here?) I get:
summary(lme1)
Linear mixed-effects model fit by REML
Data: data
AIC BIC logLik
365.8327 382.5576 -176.9163
Random effects:
Formula: ~1 | block
(Intercept) Residual
StdDev: 0.4306096 0.9450976
Fixed effects: Cu ~ Treatment
Value Std.Error DF t-value p-value
(Intercept) 5.587839 0.2632831 104 21.223688 0.0000 ***
TreatmentB -0.970384 0.3729675 16 -2.601792 0.0193 ***
TreatmentC -1.449250 0.3656351 16 -3.963651 0.0011 ***
TreatmentD -1.319564 0.3633837 16 -3.631323 0.0022 ***
Correlation:
(Intr) TrtmAN TrtmCH
TreatmentB -0.706
TreatmentC -0.720 0.508
TreatmentD -0.725 0.511 0.522
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-2.85762206 -0.68568460 -0.09004478 0.56237152 3.20650288
Number of Observations: 124
Number of Groups: 20
2. if so how can I get p values for comparisons between every
group... ie is A different from B, is A different from C, is A different
from D, is B different from C, is B different from D etc... is there a
way to get all of these instead of just "is A different from B, is A
different from C, is A different from D" which summary seems to give?
3. last of all what is the best way to print out all the residuals
for lme... I can get qqplot(lme1) is there a pre-programmed call for
multiple diagnostic plots like in some other functions...
Thankyou so Much for your time....
It is much appreciated
;-)
Miki
[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
View this message in context: http://www.nabble.com/Mixed-effects-model-where-nested-factor-is-not-the-repeated-across-treatments-lme----tp18732327p18738202.html Sent from the R help mailing list archive at Nabble.com.