Skip to content

{ Tag Archives } effect size

Different corr(s) of different IV scopes with same regression coef

With known in the linear relationship, can the correlation in the scatter plot of Y against X be estimated from the linear formula?
You may recall in Hierarchical Linear Model class, the scopes of the W dramatically impact the regression coefficients of F~W in the following R demo (hlm.jpg). While this time the regression [...]

Also tagged

“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 [...]

Also tagged ,