Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mediationBK

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

processR

Implementation of the 'PROCESS' Macro

v0.2.6
GPL-2
Authors
Keon-Woong Moon [aut, cre], Sokyoung Hong [ctb]
Initial release
2021-1-5

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.