mediate_ws: Calculate indirect effects of X on Y through a mediator in...

Description Usage Arguments Value Examples

View source: R/mediate_ws.R

Description

Calculate indirect effects of X on Y through a mediator in two-condition within-subjects design

Usage

1
2
3
tidy.bootci(x, estimate = FALSE)

mediate_ws(df, M1, M2, Y1, Y2, Reps = 5000, CONF = 0.95, BSType = "basic")

Arguments

df

a tidy dataframe, each row one observation and with columns for that have the value for the mediating variable at time 1, the mediating variable at time 2, the value of the dependent variable (Y) at time 1, and the value of the dependent variable at time 2, respectively

M1

the name of the column with the values of the mediating variable at time 1

M2

the name of the column with the values of the mediating variable at time 2

Y1

the name of the column with the values of the dependent variable at time 1

Y2

the name of the column with teh values of the dependent variable at time2

Reps

the number of bootstrap samples

CONF

the confidence interval width. You can have multiple values here.

BSType

the bootstrap CI that is calculated

Value

A data frame, where each row is a different bootstrap calculation (if you did more than one). There is a column indicating the bootstrap method used, the confidence interval level, the lower bound of the confidence interval, the higher bound of the confidence interval, and the estimate

Examples

1
mediate_ws(sample_data, M1, M2, Y1, Y2, Reps = 3000, CONF = c(.9, .95, .99), BSType = "bca")

robinsones/rmemore documentation built on May 27, 2019, 11:39 a.m.