Dear R-users,
In a randomized placebo-controlled within-subject design, subjects recieved a psycho-active drug and placebo. Subjects filled out a questionnaire containing 15 scales on four different time points after drug administration. In order to detect drug effects on each time point, I compared scale values between placebo and drug for all time conditions and scales, which sums up to 4*15=60 comparisons. I have summarized the results in a data.frame with columns for t test results including confidence intervals and mean-differences: df1<-data.frame(trt=gl(2,35),matrix(rnorm(4200),70,60)) df2<-as.data.frame(matrix(NA,60,6)) names(df2)<-c('t','df','p','lower','upper','mean.diff') for (i in 1:60) {df2[i,1:6]<-as.numeric( unlist(t.test(df1[,i+1]~df1$trt,paired=T))[1:6])} Now, I want to adjust the confidence intervals for multiple comparisons. For a Bonferroni-adjustment, I did the following: df2$std.error.of.diff<-df2$mean.diff/df2$t ci<-qt(p=1-(0.05/nrow(df2)),df=df2$df)*df2$std.error.of.diff ci.bonf<-data.frame(lower=df2$mean.diff-ci,upper=df2$mean.diff+ci) I hope this is the correct method. However, I think, the Bonferroni-adjustment would be much too conservative. I need a less conservative approach, perhaps, something like Holm's method, which I can easily apply to the p-value with p.adjust(df2$p,method='holm'). Is there package, which can do this for the confidence-interval or could someone provide a simple script to calculate this? Thanks a lot! Erich [[alternative HTML version deleted]] ______________________________________________ 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.