Learn R Programming

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

powerMediation (version 0.2.3)

Power/Sample Size Calculation for Mediation Analysis

Description

Functions to calculate power and sample size for testing (1) mediation effects; (2) the slope in a simple linear regression; (3) odds ratio in a simple logistic regression; (4) mean change for longitudinal study with 2 time points; and (5) interaction effect in 2-way ANOVA.

Copy Link

Version

Install

install.packages('powerMediation')

Monthly Downloads

451

Version

0.2.3

License

GPL (>= 2)

Maintainer

Weiliang Qiu

Last Published

February 23rd, 2015

Functions in powerMediation (0.2.3)

ss.SLR.rho

Sample size for testing slope for simple linear regression based on R2
powerLong

Power calculation for longitudinal study with 2 time point
ssMediation.VSMc.cox

Sample size for testing mediation effect in cox regression based on Vittinghoff, Sen and McCulloch's (2009) method
ssMediation.VSMc.logistic

Sample size for testing mediation effect in logistic regression based on Vittinghoff, Sen and McCulloch's (2009) method
ssLongFull

Sample size calculation for longitudinal study with 2 time point
testMediation.Sobel

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

Calculating sample size for simple logistic regression with binary predictor
ssMediation.VSMc.poisson

Sample size for testing mediation effect in poisson regression based on Vittinghoff, Sen and McCulloch's (2009) method
minEffect.VSMc

Minimum detectable slope for mediator in linear regression based on Vittinghoff, Sen and McCulloch's (2009) method
minEffect.VSMc.logistic

Minimum detectable slope for mediator in logistic regression based on Vittinghoff, Sen and McCulloch's (2009) method
minEffect.VSMc.poisson

Minimum detectable slope for mediator in poisson regression based on Vittinghoff, Sen and McCulloch's (2009) method
powerLogisticCon

Calculating power for simple logistic regression with continuous predictor
powerLogisticBin

Calculating power for simple logistic regression with binary predictor
powerInteract

Power for detecting interaction effect in 2-way ANOVA
powerMediation.Sobel

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

Sample size for testing mediation effectd (Sobel's test)
ss.SLR

Sample size for testing slope for simple linear regression
powerLong.multiTime

Power calculation for testing if mean changes for 2 groups are the same or not for longitudinal study with more than 2 time points
powerLongFull

Power calculation for longitudinal study with 2 time point
powerMediation.VSMc

Power for testing mediation effect in linear regression based on Vittinghoff, Sen and McCulloch's (2009) method
minEffect.VSMc.cox

Minimum detectable slope for mediator in cox regression based on Vittinghoff, Sen and McCulloch's (2009) method
SSizeLogisticCon

Calculating sample size for simple logistic regression with continuous predictor
ssMediation.VSMc

Sample size for testing mediation effect in linear regression based on Vittinghoff, Sen and McCulloch's (2009) method
powerMediation.VSMc.poisson

Power for testing mediation effect in poisson regression based on Vittinghoff, Sen and McCulloch's (2009) method
powerMediation.VSMc.logistic

Power for testing mediation effect in logistic regression based on Vittinghoff, Sen and McCulloch's (2009) method
ssLong

Sample size calculation for longitudinal study with 2 time point
ssLong.multiTime

Sample size calculation for testing if mean changes for 2 groups are the same or not for longitudinal study with more than 2 time points
minEffect.SLR

Minimum detectable slope
powerMediation.VSMc.cox

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

Power for testing slope for simple linear regression
power.SLR

Power for testing slope for simple linear regression