Learn R Programming

powerMediation (version 0.3.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

549

Version

0.3.4

License

GPL (>= 2)

Maintainer

Last Published

March 23rd, 2021

Functions in powerMediation (0.3.4)

SSizeLogisticCon

Calculating sample size for simple logistic regression with continuous predictor
powerInteract2by2

Power Calculation for Interaction Effect in 2x2 Two-Way ANOVA Given Effect Sizes
minEffect.SLR

Minimum detectable slope
minEffect.VSMc

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

Power for testing slope for simple linear regression
minEffect.VSMc.poisson

Minimum detectable slope for mediator in poisson 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
power.SLR.rho

Power for testing slope for simple linear regression
minEffect.VSMc.logistic

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

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

Power for testing mediation effect in linear regression based on Vittinghoff, Sen and McCulloch's (2009) method
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
powerLongFull

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

Power for testing mediation effect (Sobel's test)
powerLogisticCon

Calculating power for simple logistic regression with continuous predictor
powerLogisticBin

Calculating power for simple logistic regression with binary predictor
powerMediation.VSMc.poisson

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

Sample size calculation for longitudinal study with 2 time point
ss.SLR

Sample size for testing slope for simple linear regression
powerPoisson

Power calculation for simple Poisson regression
powerMediation.VSMc.logistic

Power for testing mediation effect in logistic 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
sizePoisson

Sample size calculation for simple Poisson regression
ssMediation.VSMc.logistic

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

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

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

Sample size for testing mediation effect 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
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
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
testMediation.Sobel

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