Dear R-group, I am trying desperately to get this Tukey test working. Its my first time here so I hope my question is not too stupid, but I couldn't find anything helpful in the help or in the forum.
I am analysing a dataset of treated grasses. I want to find out, if the grasses from different Provenances react differently. In the aov test I found a significance for the combination Treatment and provenance: summary(PAMaov<-aov(PAMval~Treatmentf*Pretreatmentf*Provenancef+Error(Datef/Code))) Treatmentf:Provenancef p-value: 0.008023 ** In the Linear fixed effects model lme, I can see that there is a significance for two provenances (HU and ES) summary(PAM.lme<-lme(PAMval~Treatmentf*Provenancef*Pretreatmentf, random= ~1|Datef/Code,na.action=na.omit)) Value Std.Error DF t-value p-value (Intercept) 0.6890317 0.06117401 994 11.263473 0.0000 TreatmentfF -0.2897619 0.05484590 467 -5.283201 0.0000 ProvenancefDE 0.0105873 0.05484590 467 0.193037 0.8470 TreatmentfF:ProvenancefES 0.1647302 0.08226884 467 2.002340 0.0458 TreatmentfF:ProvenancefHU 0.1569524 0.07756381 467 2.023526 0.0436 No the big mystery is the Tukey test. I just can't find the mistake, it keeps telling me, that there are " less than two groups" summary(glht(PAM.lme, linfct = mcp(Provenancef = "Tukey"))) Fehler in contrMat(table(mf[[nm]]), type = types[pm]) : less than two groups I guess its important to know that I made factors out of some of the data. Here is the code: PAMdata$provenance[PAMdata$provenance == "5"] = "ES" PAMdata$provenance[PAMdata$provenance == "6"] = "HU" # etc. Treatmentf <- factor(PAMdata$treatment, levels=c("C","F")) Datef <- factor(PAMdata$Date, levels=c( "25.05.10 14:00","26.05.10 19:00","27.05.2010 7:30","27.05.10 14:00","01.06.10 14:00","02.06.10 19:00","23.06.10 12:30"),ordered=TRUE) Pretreatmentf <- as.factor(PAMdata$pretreatment) Provenancef <- as.factor(PAMdata$provenance) Greenhousef <- as.factor(PAMdata$greenhouse) Individualf <- as.factor(PAMdata$individual) PAMval <- (PAMdata$DataPAM) Code<-(PAMdata$code) Thank you for any hint! That Tukey test seems so easy, I just can't find the mistake.... Thank you very much fpr your help and greetings from Tanzania, Lilith -- View this message in context: http://r.789695.n4.nabble.com/Tukey-Test-lme-error-less-than-two-groups-tp3069789p3069789.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@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.