Learn R Programming

⚠️There's a newer version (0.3.4) of this package.Take me there.

powerMediation (version 0.0.6)

Power/Sample size calculation for mediation analysis

Description

The package contains functions for calculating power, sample size, and minimal detectable mediation effect for testing mediation effect (Sobel's test) of a simple mediation model with continuous response, and only one predictor and only one mediator. The package also contains functions for calculating power, sample size, and minimal detectable slope for testing the slope in a simple linear regression (only one predictor).

Copy Link

Version

Install

install.packages('powerMediation')

Monthly Downloads

451

Version

0.0.6

License

GPL (>= 2)

Maintainer

Weiliang Qiu

Last Published

February 4th, 2010

Functions in powerMediation (0.0.6)

minEffect.VSMc

Minimum detectable slope
testMediation.Sobel

P-value and confidence interval for testing mediation effect (Sobel's test)
ss.SLR

Sample size for testing slope for simple linear regression
powerMediation.Sobel

Power for testing mediation effect (Sobel's test)
minEffect.SLR

Minimum detectable slope
ssMediation.Sobel

Sample size for testing mediation effectd (Sobel's test)
ssMediation.VSMc

Sample size for testing mediation effect based on Vittinghoff and McCulloch's (2009) method
power.SLR

Power for testing slope for simple linear regression
ss.SLR.rho

Sample size for testing slope for simple linear regression based on R2
powerMediation.VSMc

Power for testing mediation effect based on Vittinghoff and McCulloch's (2009) method
power.SLR.rho

Power for testing slope for simple linear regression