Hi,
Tried with your example dataset:
Are you able to get results with the example data?
dat1<-read.table(text="
subspecies? WMF
1????? rowleyi 2.50
2????? rowleyi 2.30
3????? rowleyi 2.35
49????? beatae 2.20
50????? beatae 2.35
51????? beatae 2.45
91??? levipes 2.45
92??? levipes 2.35
93??? levipes 2.50
122 carletoniA 2.20
123 carletoniA 2.10
124 carletoniA 2.30
135 carletoniB 2.60
136 carletoniB 2.40
137 carletoniB 2.60
145? schmidlyi 2.50
146? schmidlyi 2.70
147? schmidlyi 2.70
161??? simulus 2.40
162??? simulus 2.20
163??? simulus 2.30
",sep="",header=TRUE,stringsAsFactors=TRUE)
library(agricolae)
fm1<-aov(WMF~subspecies,data=dat1)
?duncan.test(fm1,"subspecies",14,0.01131,0.05)
#Study:
#Duncan's new multiple range test
#for WMF
#
#Mean Square Error:? 0.01130952
#subspecies,? means
#
?# ????????????? WMF??? std.err replication
#beatae???? 2.333333 0.07264832?????????? 3
#carletoniA 2.200000 0.05773503?????????? 3
#carletoniB 2.533333 0.06666667?????????? 3
#levipes??? 2.433333 0.04409586?????????? 3
#rowleyi??? 2.383333 0.06009252?????????? 3
#schmidlyi? 2.633333 0.06666667?????????? 3
#simulus??? 2.300000 0.05773503?????????? 3
#alpha: 0.05 ; Df Error: 14
#Critical Range
?# ????? 2???????? 3???????? 4???????? 5???????? 6???????? 7
#0.1862347 0.1951445 0.2006433 0.2043603 0.2070022 0.2089363
#
#Means with the same letter are not significantly different.
#Groups, Treatments and means
#a ??? ?schmidlyi? ??? ?2.63333333333333
#ab ??? ?carletoniB ??? ?2.53333333333333
# bc ??? ?levipes??? ??? ?2.43333333333333
# bcd ??? ?rowleyi??? ??? ?2.38333333333333
# bcd ??? ?beatae???? ??? ?2.33333333333333
?# cd ??? ?simulus??? ??? ?2.3
?? d ??? ?carletoniA ??? ?2.2
A.K.
----- Original Message -----
From: Amanda Jones <akjones82 at gmail.com>
To: r-help at r-project.org
Cc:
Sent: Sunday, November 25, 2012 12:41 AM
Subject: [R] Multiple Range Means Test
Hello,
My boss wants me to do a Duncan's test, which is under the agricolae
package. Unfortunately I am not versed enough in R to run my data. I
have 7 subspecies of deer mouse for which I have 23 measurements which
are my variables of interest. I have run an ANOVA for each of the set
of subspecies and variables, my data look like this:
subspecies? WMF
1? ? ? rowleyi 2.50
2? ? ? rowleyi 2.30
3? ? ? rowleyi 2.35
49? ? ? beatae 2.20
50? ? ? beatae 2.35
51? ? ? beatae 2.45
91? ? levipes 2.45
92? ? levipes 2.35
93? ? levipes 2.50
122 carletoniA 2.20
123 carletoniA 2.10
124 carletoniA 2.30
135 carletoniB 2.60
136 carletoniB 2.40
137 carletoniB 2.60
145? schmidlyi 2.50
146? schmidlyi 2.70
147? schmidlyi 2.70
161? ? simulus 2.40
162? ? simulus 2.20
163? ? simulus 2.30
This is condensed. My data is called dat. The help for duncan.test
shows the argument like this:? duncan.test(y, trt, DFerror, MSerror,
alpha = 0.05, group=TRUE, main = NULL)
When I try to run it as duncan.test(aov, dat, 6, .297, alpha=.05,
group=TRUE, main=NULL) it gives me an error message that I have
differing rows, 0 and 163. 163 is the correct number, where is it
getting the 0 from?
Thank you,
Amanda Jones
______________________________________________
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.