plot.vareffects | R Documentation |
Plots estimated conditional or marginal predictions.
## S3 method for class 'vareffects'
plot(
x,
...,
xlabs = NULL,
ylabs = NULL,
xtrans_fun = NULL,
pos = 0.5,
ci = TRUE,
facet_scales = "fixed",
facet_ncol = NULL
)
x |
|
... |
for future implementations |
xlabs |
x-axis label. If |
ylabs |
y-axis label. If |
xtrans_fun |
function to transform x values to the original or other scales. Useful when x was transformed prior to model fitting. |
pos |
spacing between labels of categorical variable on the plot. |
a ggplot
object.
varpred
set.seed(4567)
x <- rnorm(100, 3, 5)
y <- 0.4 + 0.7*x + rnorm(100)
df <- data.frame(y = y, x = x)
m1 <- lm(y ~ x, df)
pred1 <- varpred(m1, "x")
plot(pred1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.