powered by
Get Yhat value from simple mediation
getYhat1( data, X = NULL, M = NULL, Y = NULL, labels, digits = 3, maxylev = 6, mode = 1 )
A data.frame
Name of independent variable
Name of moderator variable
Name of dependant variable
optional list of labels
Integer indicating the number of decimal places
maximal unique length of categorical variable
Numeric. One of 1:4. 1= simple indicator coding, 2= sequential coding, 3= Helmert coding, 4= effect coding
data=protest labels=list(X="protest",M="respappr",Y="liking") getYhat1(data=protest,labels=labels)
Run the code above in your browser using DataLab