# We began with some more discussion of power analysis. # Here, we calculate the effect size f^2 for a regression # with an R^2 of .05. (This was used in G*Power.) > .05/.95 [1] 0.05263158 # Note that this corresponds to a correlation of about .2: > sqrt(.05) [1] 0.2236068 # When we did a minimum detectable effect size analysis in # G*Power, the result was stated in terms of f^2. Here, # we translate that back to R^2: > f2 <- 0.1982296 > f2/(1+f2) [1] 0.1654354 # Note that this correponds to a correlation of about .4: > sqrt(.1654354) [1] 0.4067375 # Here's another example of the same calculations: > f2 <- 0.1438856 > f2/(1+f2) [1] 0.1257867 > sqrt(f2/(1+f2)) [1] 0.3546642 # And another: > f2 <- 0.1074744 > sqrt(f2/(1+f2)) [1] 0.3115198 # Here, we examine two methods for understanding continuous # interactions. First, we look at the regression of endurance # on exercise for persons 1 sd above the mean age, persons at # the mean age, and persons 1 sd below the mean age. The # information about slopes and intercepts comes from the # SAS program "int2.sas". > plot(c(-12,16), c(-2,56),type='n',xlab="Exercise",ylab="Endurance") > points(Exercise,Endurance) > abline(c(25.88872,.97272)) > abline(c(25.88872-.26169*10.1,.97272+.04724*10.1)) > abline(c(25.88872-.26169*-10.1,.97272+.04724*-10.1)) # Here, we take a similar approach, but instead of doing the fully # continuous interaction, we approximate it by allowing separate # regressions for the four age quartiles. The numbers here come # from the SAS program "int4.sas". > plot(c(-12,16), c(-2,56),type='n',xlab="Exercise",ylab="Endurance") > points(Exercise,Endurance) > abline(c(22.90663,1.39519)) > abline(c(22.90663+1.89862,1.39519-.11760)) > abline(c(22.90663+3.91087,1.39519-.69081)) > abline(c(22.90663+5.89785,1.39519-.97328))