Q.Amc_oneway {pbANOVA}R Documentation

PB multiple comparisons of factor A in one-way ANOVA

Description

Using Parametric Bootstrap to simulate a distribution for multiple comparison in one-way ANOVA

Usage

Q.Amc_oneway(L,ns, means, s2, alpha)

Arguments

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

Value

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.

Examples


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.



[Package pbANOVA version 0.1.0 Index]