dat <- gathmann.bt
# EDA suggests Bt vs ISO is significant for thysan, not for aranei
bwdot=function(x,y,...){
panel.xyplot(jitter(as.numeric(x)),y,...)
panel.bwplot(x,y,...)
}
bwplot(thysan~gen, dat, panel=bwdot)
bwplot(aranei~gen, dat, panel=bwdot)
# ----- Parametric CI. Thysan significant, aranei not significant.
require(equivalence)
th0 <- with(dat, tost(thysan[1:8], thysan[9:16], epsilon=1))
lapply(th0[c("mean.diff","ci.diff")], round, 2)
ar0 <- with(dat, tost(aranei[1:8], aranei[9:16], alpha=.05, epsilon=.4))
lapply(ar0[c("mean.diff","ci.diff")], round, 2)
# ----- Non-parametric exact CI. Same result.
require(coin)
th1 <- wilcox_test(thysan ~ gen, data=dat, conf.int=TRUE, conf.level=0.9)
lapply(confint(th1), round, 2)
ar1 <- wilcox_test(aranei ~ gen, data=dat, conf.int=TRUE, conf.level=0.9)
lapply(confint(ar1), round, 2)
# ----- Log-transformed exact CI. Same result.
th2 <- wilcox_test(log(thysan) ~ gen, data=dat, alternative=c("two.sided"),
conf.int=TRUE, conf.level=0.9)
lapply(confint(th2), function(x) round(exp(x),2))
# ----- Log-transform doesn't work on aranei, but asinh(x/2) does
ar2 <- wilcox_test(asinh(aranei/2) ~ gen, data=dat,
alternative=c("two.sided"),
conf.int=TRUE, conf.level=0.9)
lapply(confint(ar2), function(x) round(sinh(x)*2,1))Run the code above in your browser using DataLab