Learn R Programming

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

powerMediation (version 0.2.4)

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; (5) interaction effect in 2-way ANOVA; and (6) the slope in a simple Poisson regression.

Copy Link

Version

Install

install.packages('powerMediation')

Monthly Downloads

451

Version

0.2.4

License

GPL (>= 2)

Maintainer

Weiliang Qiu

Last Published

May 8th, 2015

Functions in powerMediation (0.2.4)

minEffect.VSMc.poisson

Minimum detectable slope for mediator 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
powerMediation.VSMc.logistic

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

Power for testing slope for simple linear regression
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
SSizeLogisticBin

Calculating sample size for simple logistic regression with binary predictor
powerLogisticCon

Calculating power for simple logistic regression with continuous predictor
powerLongFull

Power calculation for longitudinal study with 2 time point
powerLogisticBin

Calculating power for simple logistic regression with binary predictor
ssMediation.Sobel

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

Power for testing slope for simple linear regression
testMediation.Sobel

P-value and confidence interval for testing mediation effect (Sobel's test)
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
powerMediation.VSMc.poisson

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

Sample size for testing mediation effect in poisson 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
SSizeLogisticCon

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

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

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

Sample size calculation for longitudinal study with 2 time point
sizePoisson

Sample size calculation for simple Poisson 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
powerLong

Power calculation for longitudinal study with 2 time point
ss.SLR.rho

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

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

Sample size for testing slope for simple linear regression
minEffect.SLR

Minimum detectable slope
ssMediation.VSMc

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

Power calculation for simple Poisson regression
ssLongFull

Sample size calculation for longitudinal study with 2 time point
powerInteract

Power for detecting interaction effect in 2-way ANOVA
ssMediation.VSMc.logistic

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