medjs_paths: Compute Power for Mediated (Indirect) Effects Using Joint...

View source: R/medjs_paths.R

medjs_pathsR Documentation

Compute Power for Mediated (Indirect) Effects Using Joint Significance Requires paths for all effects (and if 2 mediators, correlation) Standard deviations/variances set to 1.0 so paths are technically standardized

Description

Compute Power for Mediated (Indirect) Effects Using Joint Significance Requires paths for all effects (and if 2 mediators, correlation) Standard deviations/variances set to 1.0 so paths are technically standardized

Usage

medjs_paths(
  a1,
  a2 = NULL,
  b1,
  b2 = NULL,
  rm1m2 = NULL,
  cprime,
  n,
  alpha = 0.05,
  mvars,
  rep = 1000
)

Arguments

a1

path between predictor and first mediator

a2

path between predictor and first mediator

b1

Path between first mediator and dependent variable

b2

Path between first mediator and dependent variable

rm1m2

Correlation first mediator (m1) and second mediator (m2)

cprime

Path between predictor and dependent variable

n

Sample size

alpha

Type I error (default is .05)

mvars

Number of Mediators

rep

number of repetitions (1000 is default)

Value

Power for Mediated (Indirect) Effects using Paths Coefficients

Examples

medjs_paths(a1=.25, b1=-.5,cprime=.2,mvars=1, n=150)
medjs_paths(a1=.25, a2=.1, b1=-.5,b2=-.2,cprime=.2,mvars=1, n=150)

pwr2ppl documentation built on Sept. 6, 2022, 5:06 p.m.