Learn R Programming

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

powerMediation (version 0.1.7)

Power/Sample size calculation for mediation analysis, simple linear regression, logistic regression, or longitudinal study

Description

The package contains functions (1) for calculating power, sample size, and minimal detectable mediation effect for testing mediation effect in linear, logistic, Poisson, or cox regression; (2) for calculating power, sample size, and minimal detectable slope for testing the slope in a simple linear regression (only one predictor); (3) for calculating power, and sample size for testing odds ratio in a simple logistic regression with continuous predictor or binary predictor; (4) for calculating power, and sample size for testing mean change for longitudinal study with 2 time points.

Copy Link

Version

Install

install.packages('powerMediation')

Monthly Downloads

451

Version

0.1.7

License

GPL (>= 2)

Maintainer

Weiliang Qiu

Last Published

November 9th, 2013

Functions in powerMediation (0.1.7)

powerMediation.VSMc.logistic

Power for testing mediation effect 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
ssLongFull

Sample size calculation for longitudinal study with 2 time point
minEffect.VSMc

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

Sample size for testing slope for simple linear regression
ssMediation.VSMc.poisson

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

Minimum detectable slope
SSizeLogisticCon

Calculating sample size for simple logistic regression with continuous predictor
powerLong

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

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

Sample size for testing mediation effect in linear 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
SSizeLogisticBin

Calculating sample size for simple logistic regression with binary predictor
power.SLR

Power for testing slope for simple linear regression
ssMediation.VSMc.cox

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

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

Calculating power for simple logistic regression with binary predictor
minEffect.VSMc.cox

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

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

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

Sample size for testing mediation effectd (Sobel's test)
powerLogisticCon

Calculating power for simple logistic regression with continuous predictor
powerMediation.VSMc

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

Sample size calculation for longitudinal study with 2 time point
powerLongFull

Power calculation for longitudinal study with 2 time point
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
powerMediation.Sobel

Power for testing mediation effect (Sobel's test)