mediationBK: Perform mediation analysis by Baron and Kenny Method

View source: R/mediationBK.R

mediationBKR Documentation

Perform mediation analysis by Baron and Kenny Method

Description

Perform mediation analysis by Baron and Kenny Method

Usage

mediationBK(
  X = NULL,
  M = NULL,
  Y = NULL,
  labels = list(),
  data,
  silent = TRUE,
  indirect.test = TRUE,
  sig = 0.05
)

Arguments

X

name of independent variable

M

name of mediator variable

Y

name of dependent variable

labels

An optional list of variable names

data

A data.frame

silent

Logical. Whether or not show summary of regression tests

indirect.test

Logical. Whether or not show results of bda.mediation.test

sig

significant level. default value is 0.05

Examples

labels=list(X="cond",M="pmi",Y="reaction")
result=mediationBK(labels=labels,data=pmi,silent=FALSE)
result

cardiomoon/processR documentation built on April 20, 2023, 3:38 a.m.