View source: R/tripleInteraction.R
makeIndirectEquation | R Documentation |
Make indirect equation
makeIndirectEquation( X, M, temp1, temp2, temp3, moderatorNames, range = FALSE, data = NULL, rangemode = 1, probs = c(0.16, 0.5, 0.84), effectsize = FALSE, Y = NULL )
X |
A character string |
M |
A character string |
temp1 |
A character vector |
temp2 |
A character vector |
temp3 |
A character vector |
moderatorNames |
A character vector |
range |
A logical |
data |
A data.frame |
rangemode |
range mode |
probs |
numeric vector of probabilities with values in [0,1] |
effectsize |
logical If true, calculate effect size. |
Y |
Optional character string |
X="negemot";M="ideology" temp1=c("a1*negemot","a2*sex","a4*negemot*sex","a5*negemot*age","a6*sex*age") temp2="b1*ideology" temp3="c1*negemot" moderatorNames=c("age","sex") X= "hp";M= "am" temp1= c("a1*hp","a2*wt","a3*hp:wt") temp2= "b1*am" temp3= c("c1*hp","c2*wt","c3*hp:wt") #moderatorNames=c("wt") #X= c("d1","d2");M="am" #temp1=c("a1*d1","a2*d2","a3*wt","a4*d1:wt","a5*d2:wt") #temp2="b1*am" #temp3=c("c1*d1","c2*d2","c3*wt","c4*d1:wt","c5*d2:wt") cat(makeIndirectEquation(X,M,temp1,temp2,temp3,moderatorNames)) cat(makeIndirectEquation(X,M,temp1,temp2,temp3,moderatorNames,range=TRUE)) X="wt";M=NULL;temp1=NULL;temp2=NULL;temp3=c("c1*wt","c2*hp","c3*wt:hp"); moderatorNames="hp";range=TRUE;rangemode=1;probs=c(0.16,0.5,0.84) cat(makeIndirectEquation(X,M,temp1,temp2,temp3,moderatorNames,range=TRUE)) X="frame:skeptic"; M="justify";temp1="a1*frame:skeptic"; temp2="b1*justify";temp3="c1*frame:skeptic";moderatorNames=NULL range=TRUE;rangemode=1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.