condPlot2 | R Documentation |
Draw conditional plot for moderated moderation
condPlot2(
fit,
pred = NULL,
modx = NULL,
mod2 = NULL,
mod2.values = NULL,
rangemode = 1,
vjust = NULL,
digits = 3,
addlabel = TRUE,
xvar = "Z",
...
)
fit |
An object of class lm |
pred |
name of the predictor variable |
modx |
name of the moderator variable |
mod2 |
name of the second moderator variable |
mod2.values |
values of moderator variable |
rangemode |
integer. 1 or 2 |
vjust |
integer |
digits |
integer indicating the number of decimal places |
addlabel |
logical |
xvar |
character. "Z" or "W" |
... |
Further arguments to be passed to predict3d::ggPredict() |
fit=lm(govact~negemot*sex*age+posemot+ideology,data=glbwarm)
## Not run:
condPlot2(fit)
condPlot2(fit,mod2.values = c(30,50,70))
fit1=lm(govact~negemot*age*sex+posemot+ideology,data=glbwarm)
condPlot2(fit1,pred="negemot",modx="sex",mod2="age",mod2.values = c(30,50,70),xvar="W")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.