“Effect Size” — same data, different interpretations
d<-32; ## Try d<-20 !
## to reduce the death rate by d%, From (50+d/2)% to (50-d/2)%
y<-c(rep("Live",50+d/2),rep("Death",50-d/2));
y<-c(y,rep("Live",50-d/2),rep("Death",50+d/2));
y<-(y=="Live"); ## TRUE vs FALSE
x<-c(rep("Treatment",100),rep("Control",100));
x<-(x=="Treatment");
## correlation^2
cor(x,y,method="pearson")^2
cor(x,y,method="spearman")^2
cor(x,y,method="kendall")^2
## R^2 of linear regression with norminal IV
## should we use logistic regression?
## However, R^2 is not available in GLM.
## summary(lm(y~x))
## names(summary(lm(y~x)))
summary(lm(y~x))$r.squared
## anova
## anova(lm(y~x))
## names(anova(lm(y~x)))
s<-anova(lm(y~x))$"Sum Sq";s[1]/sum(s)
Just a short R-script note to embody the 3-page-paper of Rosenthal & Rubin (1982).
Table 1. (p. 167) listed a simple set-up. There was a between-subject treatment. Control group includes 34 alive cases and 66 dead cases. Treatment group includes 66 alive cases and 34 dead cases. The question is what is the percentage of the variance explained by the nominal IV indicating the group?
The authors pointed out that one may interpret the data result as death rate was reduced by 32% while the other may interpret the same as 10.24% variance was explained. Let’s demo it more dramatically to imagine just 4% explained variance would reduce death rate by 20%.
–
Rosenthal, R. & Rubin, D. B. (1982). A simple, general purpose display of magnitude of experimental effect. Journal of Educational Psychology, 74, 166-169.
Tagged effect size, p value, R



