230 likes | 507 Views
Mediation: PowMedR. David A. Kenny. Mediation Webinar. Power and Effect Sizes. Installing R. Start from the beginning R already installed R and RGtk2 already installed Go to opening screen. Better yet: Find your local R expert and get help!.
E N D
Mediation: PowMedR David A. Kenny
Mediation Webinar • Power and Effect Sizes
Installing R • Start from the beginning • R already installed • R and RGtk2already installed • Go to opening screen Better yet: Find your local R expert and get help!
To download R, go to the Comprehensive R Archive Network or CRAN at http://cran.r-project.org/ (if you click on this link the webinar will pause) and choose the version appropriate for your compute. The download is about 30 MB. R contains both a command line application and a GUI (graphical user interface). When R is started up for the first time, a window appears that looks like the following:
Download PowMedR at http://www.davidakenny.net/progs/PowMedR.txt (webinar will pause if you click on the link) Paste this “text” onto R GUI and your screen should look like:
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Thanks to Jake Westfall of the University of Colorado at Boulder for suggestions. library(RGtk2) rround = function (num,dig) # Rounding function { if (dig==2) return(sprintf("%.2f", round(num,2))) if (dig==3) return(sprintf("%.3f", round(num,3))) if (dig==1) return(sprintf("%.1f", round(num,1))) if (dig==4) return(sprintf("%.4f", round(num,4))) if (dig==5) return(sprintf("%.5f", round(num,5))) }
You will need to install RGtk2, the package for the PowMedR graphical interface.
The Beginning Model c Y X
The Mediational Model M b a c' Y X
Key Effects Indirect effect: ab Direct effect: c′ Total effect: c or c′ + ab
Power calculations have begun... Effect Size Power N c .390 .986 100 a .300 .868 100 b .300 .890 100 c' .300 .890 100 ab .090 .773 100 Alpha for all power calculations set to .050. Power calculations complete.
Power calculations have begun... Effect Size Power N c .390 .800 48 a .300 .800 84 b .300 .800 78 c' .300 .800 78 ab .090 .800 105Alpha for all power calculations set to .050.Power calculations complete.
PowMedR Assumes that the model is correctly specified. All variables are standardized making a, b, c, and c′ are beta coefficients. Power determined by the implied correlation between the two variables controlling for relevant variables. Joint significance method used for indirect effect.
Features Can change alpha. Always two-sided. Error check for out of range values.
Thanks! • Jake Westfall, Alexander Demos, and Craig Waterman