model4: Model 4 from the PROCESS Macro: Simple Mediation

Description Usage Arguments Value

View source: R/model4.R

Description

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

Usage

1
model4(iv, dv, med, 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.

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 effect will not return standard errors, z-values, or p-values.


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