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

getYhat1

Get Yhat value from simple mediation


Description

Get Yhat value from simple mediation

Usage

getYhat1(
  data,
  X = NULL,
  M = NULL,
  Y = NULL,
  labels,
  digits = 3,
  maxylev = 6,
  mode = 1
)

Arguments

data

A data.frame

X

Name of independant variable

M

Name of moderator variable

Y

Name of dependant variable

labels

optional list of labels

digits

Integer indicating the number of decimal places

maxylev

maximal unique length of categorical variable

mode

Numeric. One of 1:4. 1= simple indicator coding, 2= sequential coding, 3= Helmert coding, 4= effect coding

Examples

data=protest
labels=list(X="protest",M="respappr",Y="liking")
getYhat1(data=protest,labels=labels)

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.