Mediation Pow Med R David A Kenny Mediation

  • Slides: 22
Download presentation
Mediation: Pow. Med. R David A. Kenny

Mediation: Pow. Med. R David A. Kenny

Mediation Webinar • Power and Effect Sizes 2

Mediation Webinar • Power and Effect Sizes 2

Installing R • • Start from the beginning R already installed R and RGtk

Installing R • • Start from the beginning R already installed R and RGtk 2 already installed Go to opening screen Better yet: Find your local R expert and get help! 3

To download R, go to the Comprehensive R Archive Network or CRAN at http:

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: 4

5

5

Download Pow. Med. R at http: //www. davidakenny. net/progs/Pow. Med. R. txt (webinar will

Download Pow. Med. R at http: //www. davidakenny. net/progs/Pow. Med. R. txt (webinar will pause if you click on the link) Paste this “text” onto R GUI and your screen should look like: 6

# This program is distributed in the hope that it will be useful, #

# 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(RGtk 2) rround = function (num, dig) # Rounding function { if (dig==2) return(sprintf("%. 2 f", round(num, 2))) if (dig==3) return(sprintf("%. 3 f", round(num, 3))) if (dig==1) return(sprintf("%. 1 f", round(num, 1))) if (dig==4) return(sprintf("%. 4 f", round(num, 4))) if (dig==5) return(sprintf("%. 5 f", round(num, 5))) } 7

 • You will need to install RGtk 2, the package for the Pow.

• You will need to install RGtk 2, the package for the Pow. Med. R graphical interface. 8

9

9

10

10

Choose RGkt 2 11

Choose RGkt 2 11

12

12

The Beginning Model 13

The Beginning Model 13

The Mediational Model 14

The Mediational Model 14

Key Effects Indirect effect: ab Direct effect: c′ Total effect: c or c′ +

Key Effects Indirect effect: ab Direct effect: c′ Total effect: c or c′ + ab 15

This should appear: 16

This should appear: 16

Power calculations have begun. . . Effect Size Power N c. 390. 986 100

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. 17

To get N for desired power, check the box. x 18

To get N for desired power, check the box. x 18

Power calculations have begun. . . Effect Size Power N c. 390. 800 48

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 105 Alpha for all power calculations set to. 050. Power calculations complete. 19

Pow. Med. R Assumes that the model is correctly specified. All variables are standardized

Pow. Med. R 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. 20

Features Can change alpha. Always two-sided. Error check for out of range values. 21

Features Can change alpha. Always two-sided. Error check for out of range values. 21

Thanks! • Jake Westfall, Alexander Demos, and Craig Waterman 22

Thanks! • Jake Westfall, Alexander Demos, and Craig Waterman 22