Low et al (2016) examined the effects of two different anesthetics on aspects of the physiology of the mouse. Twelve mice were anesthetized with isoflurane and eleven mice were anesthetized with alpha chloralose and blood CO2 levels were recorded after 120 minutes. The H0 was that there is no difference between the anesthetics in the mean blood CO2 level. This is an independent comparison because individual mice were only given one of the two anesthetics.
First, load the required packages (tidyverse, RMisc, MKinfer, car, emmeans)
Import low data file
low <- read.csv("../data/lowco2.csv")
low
low_stats <- summarySE(data=low,measurevar="co2", groupvars="anesth")
low_stats
low %>%
group_by (anesth) %>%
summarise (median = median(co2), mean=mean(co2))
low.aov <- aov(co2~anesth,data=low)
tidy(low.aov, conf.int=TRUE)
low.emm <- emmeans(low.aov,"anesth")
eff_size(low.emm, sigma=sigma(low.aov), edf=df.residual(low.aov))
contrast effect.size SE df lower.CL upper.CL
ac - iso 1.29 0.463 21 0.329 2.25
sigma used for effect sizes: 16.2
Confidence level used: 0.95
Note that we’ve chosen to show a standardized effect size, using the pooled variance from the analysis of variance - Residual MS = 262.44, and √262.44 = 16.2
leveneTest(co2 ~ anesth, low)
Warning: group coerced to factor.
Levene's Test for Homogeneity of Variance (center = median)
Df F value Pr(>F)
group 1 2.604 0.1215
21
t.test(co2~anesth,var.equal=TRUE, data=low)
Two Sample t-test
data: co2 by anesth
t = 3.0927, df = 21, p-value = 0.005515
alternative hypothesis: true difference in means between group ac and group iso is not equal to 0
95 percent confidence interval:
6.849172 34.969010
sample estimates:
mean in group ac mean in group iso
70.90909 50.00000
t.test(co2~anesth,data=low)
Welch Two Sample t-test
data: co2 by anesth
t = 3.0206, df = 15.485, p-value = 0.008362
alternative hypothesis: true difference in means between group ac and group iso is not equal to 0
95 percent confidence interval:
6.194866 35.623316
sample estimates:
mean in group ac mean in group iso
70.90909 50.00000
wilcox.test(co2~anesth,data=low)
Warning: cannot compute exact p-value with ties
Wilcoxon rank sum test with continuity correction
data: co2 by anesth
W = 114, p-value = 0.003398
alternative hypothesis: true location shift is not equal to 0
sum(rank(low$co2)[low$anesth=="ac"])
[1] 180
sum(rank(low$co2)[low$anesth=="iso"])
[1] 96