Let us know what is/isn’t working.
It only takes a couple minutes (honestly!)
What is the purpose of sum of squares from an output from anova?
Simply, the sum of squared deviations from a mean.
A measure of variation (variance = MS = SSQ / DoF).
But there’s different kinds – remember partitioning of SSQ:
\[TSS = ESS + RSS\]
\(y_i\) - observed; \(\bar{y}\) - overall mean (‘y-bar’); \(\hat{y}\) - estimated mean (‘y-hat’).
Hint: Try to define both ideas around “relationships between variables”.
Two EVs (\(X_1, X_2\)) are said to interact if the effect of \(X_1\) on \(Y\) depends on [the value of] \(X_2\) – and also the other way around.
The difference in \(Y\) between Aspirin and placebo is different in men and women: drug effect depends on sex and v.v.
drug is informative about sex and vice versa.There are countless research reports published every year that make unsubstantiated claims because the authors do not know about interactions.
What is going on?
Gelman & Stern (2006) The difference between “significant” and “not significant” is not itself statistically significant. The American Statistician 60, 328–331.
Drug study: “Does Lowerin lower blood pressure?”
\(N=100\) patients, split by age:
Well designed… – but really, it asks more than one Q!
In your group: Try and write out the three questions that are at play here.
How would you describe the results, based on this plot?
“The effect of Lowerin depends on age: it lowers blood pressure in old patients (P<0.01) but has no effect in young patients (P>0.05).”
No, no, no!
Given DV bp and EVs age and treat…
There is no evidence that the effect of Drug X depends on age (is different in young and old patients)!
Because I’ve simulated the data, randomly drawing from normal distributions with exactly the same mean difference of 10 between drug and placebo in both age groups.
set.seed(3) # 3 works a treat
N <- 100
bp <- c(
rnorm(n=N/4, mean=110, sd=7), # young: placebo
rnorm(n=N/4, mean=105, sd=7), # young: Lowerin
rnorm(n=N/4, mean=120, sd=7), # old: placebo
rnorm(n=N/4, mean=115, sd=7) # old: Lowerin
)
age <- factor(
rep( c("young", "old"), each=N/2),
levels=c("young", "old"))
treat <- factor(
rep( rep(c("Placebo", "Lowerin"), each=N/4), 2),
levels = c("Placebo", "Lowerin"))Only if we have time in the session – if we don’t, check them out in your own time.
What they want to show: the effect of training on performance is different in the mutant flies (C,D) compared to wild-type (B).
Do they show this? Not in their analysis… all they show is that they have evidence for a training effect in the mutant flies, but that they have no evidence for a training effect in the wild-type.
Another way to express the fallacy: “Absence of evidence for an effect is not evidence of absence of that effect.
I have extracted the data values from the plot and fitted the correct model:
Analysis of Variance Table
Response: perf.index
Df Sum Sq Mean Sq F value Pr(>F)
genotype 2 0.035391 0.017695 7.0756 0.002248 **
training 1 0.181241 0.181241 72.4695 1.089e-10 ***
genotype:training 2 0.034199 0.017100 6.8373 0.002688 **
Residuals 42 0.105039 0.002501
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Phew! The authors are lucky – if correctly analysed, their data would support the claim that the effect of training is different across the three genotypes (significant genotype:starvation interaction).
BS2004 Revision lecture W5