model7: Model 7 from the PROCESS Macro: First-Stage Moderated...

Description Usage Arguments Value

View source: R/model7.R

Description

This function will perform first-stage moderated mediation, using the 'lavaan' package. It uses bias-corrected bootstrap resampling for the confidence intervals.

Usage

1
model7(iv, dv, med, mod, data, samples = 5000)

Arguments

iv

The name of the independent variable, as a character string.

dv

The name of the dependent variable, as a character string.

med

The name of the mediator, as a character string.

mod

The name of the moderator, as a character string. If the moderator is numeric with only 0s and 1s, it will return the simple indirect effects at the values of 0 and 1; if it is numeric otherwise, it will return the simple indirect effects at a standard deviation below the mean, a standard deviation above the mean, and at the mean.

data

The data frame with the relevant variables.

samples

The number of bootstrap resamples. Defaults to 5000.

Value

Coefficients, standard errors, z-values, p-values, and confidence intervals for all estimated parameters. The indirect effects will not return standard errors, z-values, or p-values. The labels for each parameter estimate match the labels provided by Hayes (2015), An Index and Test of Linear Moderated Mediation, in Multivariate Behavioral Research.


markhwhiteii/processr documentation built on Dec. 7, 2020, 11:25 p.m.