[R] pmvt problem in multcomp
Chihiro Kuroki
kuroki at oak.dti.ne.jp
Wed May 26 11:00:48 CEST 2004
Dear Mr.Torsten:
At Sun, 23 May 2004 11:40:51 +0200 (CEST),
Torsten Hothorn wrote:
>
> Yes, `pmvt' returns NaN without indicating this error. We need to check.
> Thanks for the report (and *please* cc emails reporting problems with
> packages to the maintainer!),
I am dreadfully sorry I did not cc mail to you.
> If the question relates to a package that is downloaded from
> CRAN try contacting the package maintainers first.
I overlooked the above-mentioned sentence.
BTW, I have another strange example of simtest. I want to know
why simtest returns these p-values.
-- example 1 -------------------------------
rm(list = ls())
require(multcomp)
y1 <- c(seq(3,7),seq(3,7))
y2 <- c(rep(c(6,7,8,9),7))
sort(runif(28),index=T) -> a
y3 <- numeric(0)
for(i in 1:28){
y3[i] <- y2[a$ix[i]]
}
y4 <- c(y1,y3,14,18)
f2 <- factor(c(rep(1,10),rep(2,8),rep(3,8),rep(4,8),rep(5,6)))
dat2 <- cbind(as.data.frame(y4),f2)
summary(simtest(y4 ~ f2, data=dat2, type="Dunnett"))
> dat2
y4 f2
1 3 1
2 4 1
3 5 1
4 6 1
5 7 1
6 3 1
7 4 1
8 5 1
9 6 1
10 7 1
11 6 2
12 7 2
13 6 2
14 9 2
15 7 2
16 8 2
17 6 2
18 8 2
19 9 3
20 8 3
21 7 3
22 9 3
23 6 3
24 8 3
25 9 3
26 7 3
27 7 4
28 9 4
29 6 4
30 6 4
31 9 4
32 8 4
33 7 4
34 9 4
35 6 5
36 8 5
37 8 5
38 7 5
39 14 5
40 18 5
> summary(simtest(y4 ~ f2, data=dat2, type="Dunnett"))
Simultaneous tests: Dunnett contrasts
Call:
simtest.formula(formula = y4 ~ f2, data = dat2, type = "Dunnett")
Dunnett contrasts for factor f2
Contrast matrix:
f21 f22 f23 f24 f25
f22-f21 0 -1 1 0 0 0
f23-f21 0 -1 0 1 0 0
f24-f21 0 -1 0 0 1 0
f25-f21 0 -1 0 0 0 1
Absolute Error Tolerance: 0.001
Coefficients:
Estimate t value Std.Err. p raw p Bonf p adj
f25-f21 5.167 -4.644 1.022 0.000 0.000 0.000
f23-f21 2.875 -2.813 1.022 0.008 0.024 0.022
f24-f21 2.625 -2.569 1.022 0.015 0.029 0.028
f22-f21 2.125 -2.079 1.113 0.045 0.045 0.045
---------------------------------
I got the following inequality from the appended chart of a
book.
2.558 < d(5, 35, 0.4263464, 0.05) < 2.598
Are these "p adj" values right?
Or do I misunderstand some?
--
kuroki
GnuPG fingerprint = 90FD FE79 905F 26F9 29C4 096F 8AA2 2C42 5130 1469
More information about the R-help
mailing list