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

Description Usage Arguments Value Examples

View source: R/medjs.R

Description

Compute Power for Mediated (Indirect) Effects Using Joint Significance Requires correlations between all variables as sample size. This is the recommended approach for determining power

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
medjs(
  rx1x2 = NULL,
  rx1m1,
  rx1m2 = NULL,
  rx1m3 = NULL,
  rx1m4 = NULL,
  rx1y,
  rx2m1 = NULL,
  rx2m2 = NULL,
  rx2m3 = NULL,
  rx2m4 = NULL,
  rx2y,
  rym1,
  rym2 = NULL,
  rym3 = NULL,
  rym4 = NULL,
  rm1m2 = NULL,
  rm1m3 = NULL,
  rm1m4 = NULL,
  rm2m3 = NULL,
  rm2m4 = NULL,
  rm3m4 = NULL,
  n,
  alpha = 0.05,
  mvars,
  rep = 1000,
  pred = 1
)

Arguments

rx1x2

Correlation between first predictor (x1) and second predictor (x2)

rx1m1

Correlation between first predictor (x1) and first mediator (m1)

rx1m2

Correlation between first predictor (x1) and second mediator (m2)

rx1m3

Correlation between first predictor (x1) and third mediator (m3)

rx1m4

Correlation between first predictor (x1) and fourth mediator (m4)

rx1y

Correlation between DV (y) and first predictor (x1)

rx2m1

Correlation between second predictor (x2) and first mediator (m1)

rx2m2

Correlation between second predictor (x2) and second mediator (m2)

rx2m3

Correlation between second predictor (x2) and third mediator (m3)

rx2m4

Correlation between second predictor (x2) and fourth mediator (m4)

rx2y

Correlation between DV (y) and second predictor (x2)

rym1

Correlation between DV (y) and first mediator (m1)

rym2

Correlation between DV (y) and second mediator (m2)

rym3

Correlation DV (y) and third mediator (m3)

rym4

Correlation DV (y) and fourth mediator (m4)

rm1m2

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

rm1m3

Correlation first mediator (m1) and third mediator (m3)

rm1m4

Correlation first mediator (m1) and fourth mediator (m4)

rm2m3

Correlation second mediator (m2) and third mediator (m3)

rm2m4

Correlation second mediator (m2) and fourth mediator (m4)

rm3m4

Correlation third mediator (m3) and fourth mediator (m4)

n

Sample size

alpha

Type I error (default is .05)

mvars

Number of Mediators

rep

number of repetitions (1000 is default)

pred

number of predictors (default is one)

Value

Power for Mediated (Indirect) Effects

Examples

1
2
medjs(rx1m1=.3, rx1m2=.3, rx1m3=.25, rx1y=-.35, rym1=-.5,rym2=-.5, rym3 = -.5,
rm1m2=.7, rm1m3=.4,rm2m3=.4, mvars=3, n=150)

pwr2ppl documentation built on April 4, 2021, 9:06 a.m.