Q.Amc_oneway | R Documentation |
Using Parametric Bootstrap to simulate a distribution for multiple comparison in one-way ANOVA
Q.Amc_oneway(L,ns, means, s2, alpha)
L |
Number of simulated values for the distribution |
ns |
sample size for each group |
means |
sample mean for each group |
s2 |
sample variance for each group |
alpha |
significant level |
the simulated p-value
D.crit: The (1 - alpha) percentile of the simulated distribution
res.df: The differences, confidence intervals for the difference, and p-values for comparisons of each two factor levels.
library(pbANOVA) data(fedata) fedata$depth <- factor(fedata$depth) library(Rmisc) summarySE(fedata, "Y", "depth") feNs <- summarySE(fedata, "Y", "depth")$N feYs <- summarySE(fedata, "Y", "depth")$Y fes2 <- (summarySE(fedata, "Y", "depth")$sd)^2 anova(lm(Y~depth, data=fedata)) #F-test significant #we saw in the dunnett's example that the equal variance assumption is violated library(MASS) #need MASS for ginv function for all the interaction and main effects algorithms alg.A1(ns=feNs, ybars=feYs, s2=fes2, a=6, L=5000) #p=0.0038 #multiple comparisons Q.Amc_oneway(L = 5000, ns=feNs, means=feYs, s2=fes2, alpha = 0.05) #compare to Tukey's test TukeyHSD(aov(Y~depth, data=fedata)) #results agree only for some levels.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.