| treatment | tree1 | tree2 | tree3 | tree4 | tree5 |
|---|---|---|---|---|---|
| oil | 4 | 29 | 14 | 14 | 7 |
| spores | -4 | 29 | 4 | -2 | 11 |
| water | -9 | 18 | 10 | 9 | -6 |
2024-10-09
Your completed Qualtrics experiments are due for Pre-Approval by Fri Oct 11 11:59p.
I should be able to see any images you used or links to media. I’ll be paying particular attention to your consent form. It’s not unusual for me to ask for revisions before you launch your study.
I will give you approval or revisions via Slack direct messages. Watch out for those!
Once you have completed any revisions and receive approval from me you can complete the following checklist and then share your anonymous survey link.
Modern zoos try to reproduce natural habitats in their exhibits as much as possible. They try to use appropriate plants, but these plants can be infested with inappropriate insects. Cycads (plants that look vaguely like palms) can be infected with mealybugs, and the zoo wishes to test three treatments: 1) water, 2) horticultural oil, and 3) fungal spores in water. Nine infested cycads are taken to the testing area. Three branches are randomly selected from each tree, and 3 cm by 3 cm patches are marked on each branch. The number of mealybugs on the patch is counted. The three treatments then get randomly assigned to the three branches for each tree. After three days the mealybugs are counted again. The change in number of mealybugs is computed (\(before-after\)).
| treatment | tree1 | tree2 | tree3 | tree4 | tree5 |
|---|---|---|---|---|---|
| oil | 4 | 29 | 14 | 14 | 7 |
| spores | -4 | 29 | 4 | -2 | 11 |
| water | -9 | 18 | 10 | 9 | -6 |
Draw the factor diagram.
We add our blocking factor as color and also as group.
We can see that Tree 2’s infestation was very responsive to the treatments whereas Tree 1’s was not.
\[{y}_{ij}={\mu}+{\tau}_{i}+{\beta}_{j}+{e}_{ij}\]
| Source | SS | df | MS | F |
|---|---|---|---|---|
| Treatment | \(\sum_{i=1}^{a}b(\bar{y}_{i.}-\bar{y}_{..})^{2}\) | \(a-1\) | \(\frac{{SS}_{T}}{{df}_{T}}\) | \(\frac{{MS}_{T}}{{MS}_{E}}\) |
| Blocks | \(\sum_{j=1}^{b}a(\bar{y}_{.j}-\bar{y}_{..})^{2}\) | \(b-1\) | \(\frac{{SS}_{B}}{{df}_{B}}\) | \(\frac{{MS}_{B}}{{MS}_{E}}\) |
| Error | \(\sum_{i=1}^{a}\sum_{j=1}^{b}({y}_{ij}-\bar{y}_{i.}-\bar{y}_{.j}+\bar{y}_{..})^{2}\) | \((a-1)(b-1)\) | \(\frac{{SS}_{E}}{{df}_{E}}\) |
Analysis of Variance Table
Response: bugs_change
Df Sum Sq Mean Sq F value Pr(>F)
treatment 2 218.13 109.07 2.9963 0.106846
tree 4 1316.40 329.10 9.0412 0.004603 **
Residuals 8 291.20 36.40
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Write a sentence interpreting the results of the F-test for treatment and a sentence interpreting the F-test for tree in the context of the problem.
Analysis of Variance Table
Response: bugs_change
Df Sum Sq Mean Sq F value Pr(>F)
treatment 2 218.13 109.07 2.9963 0.106846
tree 4 1316.40 329.10 9.0412 0.004603 **
Residuals 8 291.20 36.40
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
There are no statistically significant differences in the reduction in mealy bugs between the three treatment conditions, \(F(2, 8) = 3.00\), \(p = .107\). There are significant differences in the reduction in mealy bugs across trees, however, \(F(4, 8) = 9.04\), \(p = .005\). That is, some trees improved more than other trees.
C. Constant effects – think about whether it is reasonable.
A. Additive effects – check Anscombe block plots.
S. Same standard deviations – is the biggest SD less than two times as large as the smallest? check residual versus fitted plot: does the plot thicken?
I. Independent residuals – think about whether it is reasonable.
N. Normally distributed residuals – construct a histogram or normal probability plot of residuals.
Z. Zero mean residuals – construct a histogram or normal probability plot of residuals.
# A tibble: 3 × 3
treatment m sd
<chr> <dbl> <dbl>
1 oil 13.6 9.66
2 spores 7.6 13.3
3 water 4.4 11.5
mealybugs %>%
group_by(treatment) %>%
summarize(m = mean(bugs_change),
sd = sd(bugs_change)) %>%
summarize(max(sd)/min(sd)) #calculating using min and max function# A tibble: 1 × 1
`max(sd)/min(sd)`
<dbl>
1 1.38
\[\hat{{y}}_{ij}={\mu}+{\tau}_{i}+{\beta}_{j}\]
If the plot thickens, that is, has a patterning that looks like a funnel, then the S condition is not satisfied.
We’re looking for residuals to be on the line. If so, then we can say they are normally distributed.
If the histogram centered at zero? Then the Z condition is satisfied.
Assess the CA-SINZ conditions for the SleepingShrews dataset from example 6.7b in your textbook.
qplot(x = DSW, y = LSW, data = SleepingShrews_wide) +
geom_abline(intercept = 2, slope = 1, color = "blue", linetype = 2) +
geom_smooth(method = "lm", se = 0, color = "orange") #A condition
qplot(x = DSW, y = REM, data = SleepingShrews_wide) +
geom_abline(intercept = 2, slope = 1, color = "blue", linetype = 2) +
geom_smooth(method = "lm", se = 0, color = "orange") #A condition
qplot(x = LSW, y = REM, data = SleepingShrews_wide) +
geom_abline(intercept = -2, slope = 1, color = "blue", linetype = 2) +
geom_smooth(method = "lm", se = 0, color = "orange") #A condition
SleepingShrews %>%
group_by(Phase) %>%
summarize(m = mean(Rate),
sd = sd(Rate)) %>%
summarize(max(sd)/min(sd)) #S condition
mod <- lm(Rate ~ Phase + Shrew, data = SleepingShrews)
plot(mod, which = 1) #S condition
plot(mod, which = 2) #N condition
qplot(mod$residuals, bins = 6) #N and Z conditions