lme-post hoc

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

lme-post hoc

plsc
Hi all,

I analysed my data with lme and after that I spent a lot of time for
 mean separation of treatments (post hoc). But still I couldn’t make
through it. This is my data set and R scripts I tried.

replication fertilizer variety plot height

1 level1 var1 1504 52

1 level1 var3 1506 59

1 level1 var4 1509 54

1 level1 var2 1510 48

2 level1 var1 2604 47

2 level1 var4 2606 51

2 level1 var3 2607 55

2 level1 var2 2609 44

3 level1 var2 3401 46

3 level1 var3 3402 64

3 level1 var4 3403 64

3 level1 var1 3404 50

1 level2 var3 1601 59

1 level2 var1 1605 56

1 level2 var2 1610 53

1 level2 var4 1611 53

2 level2 var2 2403 56

2 level2 var1 2405 61

2 level2 var4 2407 69

2 level2 var3 2413 70

3 level2 var3 3508 67

3 level2 var4 3511 73

3 level2 var2 3512 62

3 level2 var1 3513 67

1 level3 var4 1406 77

1 level3 var3 1408 74

1 level3 var1 1409 71

1 level3 var2 1410 69

2 level3 var4 2501 62

2 level3 var3 2507 58

2 level3 var2 2508 56

2 level3 var1 2513 63

3 level3 var3 3601 73

3 level3 var2 3603 59

3 level3 var1 3609 56

3 level3 var4 3612 61

modela<-lme(height~variety*fertilizer, random=~1|replication)

summary(modela)

anova(modela)


library(multcomp)

hgt <- glht(modela,linfct=mcp(fertilizer="Tukey"))

summary(hgt)


Any body can help me to proceed tukey (or lsd) with lme that would be highly appreciated.

Prabhath

University of Saskatchewan



        [[alternative HTML version deleted]]


______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: lme-post hoc

Dieter Menne
Reply | Threaded
Open this post in threaded view
|

Re: lme-post hoc

Dieter Menne
In reply to this post by plsc
plsc wrote
I analysed my data with lme and after that I spent a lot of time for
 mean separation of treatments (post hoc). But still I couldn’t make
through it. This is my data set and R scripts I tried.

....

3 level3 var4 3612 61

modela<-lme(height~variety*fertilizer, random=~1|replication)
library(multcomp)
hgt <- glht(modela,linfct=mcp(fertilizer="Tukey"))
Any body can help me to proceed tukey (or lsd) with lme that would be highly appreciated.
Try a search on tukey and lme, and make sure that you have a current version of R installed. The combination was broken on some earlier versions.

http://r-project.markmail.org/search/?q=tukey+lme

Dieter
Reply | Threaded
Open this post in threaded view
|

Re: lme-post hoc

Dieter Menne
In reply to this post by plsc
plsc wrote
I analysed my data with lme and after that I spent a lot of time for
 mean separation of treatments (post hoc). But still I couldn’t make
through it. This is my data set and R scripts I tried.

....

3 level3 var4 3612 61

modela<-lme(height~variety*fertilizer, random=~1|replication)
library(multcomp)
hgt <- glht(modela,linfct=mcp(fertilizer="Tukey"))
Any body can help me to proceed tukey (or lsd) with lme that would be highly appreciated.
Try a search on tukey and lme, and make sure that you have a current version of R installed. The combination was broken on some earlier versions.

http://r-project.markmail.org/search/?q=tukey+lme

Dieter
Reply | Threaded
Open this post in threaded view
|

Re: lme-post hoc

plsc
This post has NOT been accepted by the mailing list yet.
In reply to this post by plsc
Hi Dieter,
Thanks a lot for your help. I read the postings of link you provided me. Then my initial problem simply solved by adding name of the data set to the lme model. Results of the tukey test further improved by ML instead of REML. My corrected model was as follows (It wpould help other people having same issue).
modela<-lme(height~variety*fertilizer,
        random=~1|replication,method="ML", data=dataset)
I think there is no straight forward method to do post hoc if the interaction is significant. Following syntax was suggested in a posting and it worked for me. But I am not sure the results generated by it are correct or not.
dataset$varfert<-interaction(dataset$variety, dataset$fertilizer)
modela<-lme(height~varfert,random=~1|replication,method="ML", data=dataset)
hgt<- glht(modela, linfct=mcp(varfert="Tukey"))
summary(hgt)

Thanks again for your help!
Prabhath