getYhat1: Get Yhat value from simple mediation

View source: R/meanSummary.R

getYhat1R Documentation

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 independent 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 documentation built on Jan. 23, 2023, 5:44 p.m.