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

Description Usage Arguments Value Examples

View source: R/medjs_paths.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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

1
2
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 April 4, 2021, 9:06 a.m.