# Wrong values in Dunnett post-hoc test

I can't get the same results in R as in GraphPad Prism for repeated measures anova.

The experiment was a stimulation time course, so I have as DV=response and as factor "time" within groups, also I add a factor sample for each experiment

data <- read.csv("http://dl.dropbox.com/u/4828275/datos.csv")
options(contrasts=c("contr.sum","contr.poly"))

## Convert variables to factor
data <- within(data, {
sample <- factor(sample)
time <- factor(time)
})
aov <- aov(response~time+sample, data=data)
summary(glht(aov, linfct=mcp(time="Dunnett")))

Simultaneous Tests for General Linear Hypotheses

Multiple Comparisons of Means: Dunnett Contrasts

Fit: lme.formula(fixed = response ~ time, data = data, random = ~1 |
sample)

Linear Hypotheses:
Estimate Std. Error z value Pr(>|z|)
2 - 0 == 0    1.1789     2.0800   0.567        1
5 - 0 == 0    1.2966     2.0800   0.623        1
10 - 0 == 0   1.0555     2.0800   0.507        1
15 - 0 == 0   0.4317     2.0800   0.208        1
30 - 0 == 0   0.2148     2.0800   0.103        1
(Adjusted p values reported -- bonferroni method)


For repeated measures I have this code

aov.repeated <- ezANOVA(
data
, dv = .(response)
, wid = .(time)
, within = .(sample)
, type = 1
, return_aov = TRUE
)\$aov


The GraphPad Prism results for the same data was

Table Analyzed  Data 1

Repeated Measures ANOVA
P value   0.0415
P value summary   *
Are means signif. different? (P < 0.05)   Yes
Number of groups  6
F 2.863
R square  0.4172

Was the pairing significantly effective?
R square  0.1980
F 2.119
P value   0.1162
P value summary   ns
Is there significant matching? (P < 0.05) No

ANOVA Table SS  df  MS
Treatment (between columns)   130.6   5   26.12
Individual (between rows) 77.30   4   19.32
Residual (random) 182.4   20  9.121
Total 390.3   29

Dunnett's Multiple Comparison Test  Mean Diff.  q   Significant? P < 0.05?  Summary 95% CI of diff
0 vs 2    -2.861  1.498   No  ns  -8.085 to 2.362
0 vs 5    -5.777  3.024   Yes *   -11.00 to -0.5531
0 vs 10   -6.009  3.146   Yes *   -11.23 to -0.7855
0 vs 15   -4.621  2.419   No  ns  -9.844 to 0.6029
0 vs 30   -2.581  1.351   No  ns  -7.805 to 2.642


How can I get the same results as above in R? Is there a way to get Dunnett's Multiple Comparison Test in aov.repeated?

-

 Thank you so much, I've got an error when importing data into R corrected with time <- c(rep(0,5), rep(2,5), rep(5,5), rep(10,5), rep(15,5), rep(30,5)); sample <- c(rep(1:5, 6)) so the R transposed table was bad; now I've got the same results. – friveroll May 28 '12 at 19:14