cplot(object, ...)# S3 method for default
cplot(
object,
x = attributes(terms(object))[["term.labels"]][1L],
dx = x,
what = c("prediction", "effect"),
data = prediction::find_data(object),
type = c("response", "link"),
vcov = stats::vcov(object),
at,
n = 25L,
xvals = prediction::seq_range(data[[x]], n = n),
level = 0.95,
draw = TRUE,
xlab = x,
ylab = if (match.arg(what) == "prediction") paste0("Predicted value") else
paste0("Marginal effect of ", dx),
xlim = NULL,
ylim = NULL,
lwd = 1L,
col = "black",
lty = 1L,
se.type = c("shade", "lines", "none"),
se.col = "black",
se.fill = grDevices::gray(0.5, 0.5),
se.lwd = lwd,
se.lty = if (match.arg(se.type) == "lines") 1L else 0L,
factor.lty = 0L,
factor.pch = 19L,
factor.col = se.col,
factor.fill = factor.col,
factor.cex = 1L,
xaxs = "i",
yaxs = xaxs,
las = 1L,
scatter = FALSE,
scatter.pch = 19L,
scatter.col = se.col,
scatter.bg = scatter.col,
scatter.cex = 0.5,
rug = TRUE,
rug.col = col,
rug.size = -0.02,
...
)
# S3 method for clm
cplot(
object,
x = attributes(terms(object))[["term.labels"]][1L],
dx = x,
what = c("prediction", "classprediction", "stackedprediction", "effect"),
data = prediction::find_data(object),
type = c("response", "link"),
vcov = stats::vcov(object),
at,
n = 25L,
xvals = seq_range(data[[x]], n = n),
level = 0.95,
draw = TRUE,
xlab = x,
ylab = if (match.arg(what) == "effect") paste0("Marginal effect of ", dx) else
paste0("Predicted value"),
xlim = NULL,
ylim = if (match.arg(what) %in% c("prediction", "stackedprediction")) c(0, 1.04) else
NULL,
lwd = 1L,
col = "black",
lty = 1L,
factor.lty = 1L,
factor.pch = 19L,
factor.col = col,
factor.fill = factor.col,
factor.cex = 1L,
xaxs = "i",
yaxs = xaxs,
las = 1L,
scatter = FALSE,
scatter.pch = 19L,
scatter.col = factor.col,
scatter.bg = scatter.col,
scatter.cex = 0.5,
rug = TRUE,
rug.col = col,
rug.size = -0.02,
...
)
# S3 method for glm
cplot(
object,
x = attributes(terms(object))[["term.labels"]][1L],
dx = x,
what = c("prediction", "effect"),
data = prediction::find_data(object),
type = c("response", "link"),
vcov = stats::vcov(object),
at,
n = 25L,
xvals = prediction::seq_range(data[[x]], n = n),
level = 0.95,
draw = TRUE,
xlab = x,
ylab = if (match.arg(what) == "prediction") paste0("Predicted value") else
paste0("Marginal effect of ", dx),
xlim = NULL,
ylim = NULL,
lwd = 1L,
col = "black",
lty = 1L,
se.type = c("shade", "lines", "none"),
se.col = "black",
se.fill = grDevices::gray(0.5, 0.5),
se.lwd = lwd,
se.lty = if (match.arg(se.type) == "lines") 1L else 0L,
factor.lty = 0L,
factor.pch = 19L,
factor.col = se.col,
factor.fill = factor.col,
factor.cex = 1L,
xaxs = "i",
yaxs = xaxs,
las = 1L,
scatter = FALSE,
scatter.pch = 19L,
scatter.col = se.col,
scatter.bg = scatter.col,
scatter.cex = 0.5,
rug = TRUE,
rug.col = col,
rug.size = -0.02,
...
)
# S3 method for lm
cplot(
object,
x = attributes(terms(object))[["term.labels"]][1L],
dx = x,
what = c("prediction", "effect"),
data = prediction::find_data(object),
type = c("response", "link"),
vcov = stats::vcov(object),
at,
n = 25L,
xvals = prediction::seq_range(data[[x]], n = n),
level = 0.95,
draw = TRUE,
xlab = x,
ylab = if (match.arg(what) == "prediction") paste0("Predicted value") else
paste0("Marginal effect of ", dx),
xlim = NULL,
ylim = NULL,
lwd = 1L,
col = "black",
lty = 1L,
se.type = c("shade", "lines", "none"),
se.col = "black",
se.fill = grDevices::gray(0.5, 0.5),
se.lwd = lwd,
se.lty = if (match.arg(se.type) == "lines") 1L else 0L,
factor.lty = 0L,
factor.pch = 19L,
factor.col = se.col,
factor.fill = factor.col,
factor.cex = 1L,
xaxs = "i",
yaxs = xaxs,
las = 1L,
scatter = FALSE,
scatter.pch = 19L,
scatter.col = se.col,
scatter.bg = scatter.col,
scatter.cex = 0.5,
rug = TRUE,
rug.col = col,
rug.size = -0.02,
...
)
# S3 method for loess
cplot(
object,
x = attributes(terms(object))[["term.labels"]][1L],
dx = x,
what = c("prediction", "effect"),
data = prediction::find_data(object),
type = c("response", "link"),
vcov = stats::vcov(object),
at,
n = 25L,
xvals = prediction::seq_range(data[[x]], n = n),
level = 0.95,
draw = TRUE,
xlab = x,
ylab = if (match.arg(what) == "prediction") paste0("Predicted value") else
paste0("Marginal effect of ", dx),
xlim = NULL,
ylim = NULL,
lwd = 1L,
col = "black",
lty = 1L,
se.type = c("shade", "lines", "none"),
se.col = "black",
se.fill = grDevices::gray(0.5, 0.5),
se.lwd = lwd,
se.lty = if (match.arg(se.type) == "lines") 1L else 0L,
factor.lty = 0L,
factor.pch = 19L,
factor.col = se.col,
factor.fill = factor.col,
factor.cex = 1L,
xaxs = "i",
yaxs = xaxs,
las = 1L,
scatter = FALSE,
scatter.pch = 19L,
scatter.col = se.col,
scatter.bg = scatter.col,
scatter.cex = 0.5,
rug = TRUE,
rug.col = col,
rug.size = -0.02,
...
)
# S3 method for polr
cplot(
object,
x = attributes(terms(object))[["term.labels"]][1L],
dx = x,
what = c("prediction", "classprediction", "stackedprediction", "effect"),
data = prediction::find_data(object),
type = c("response", "link"),
vcov = stats::vcov(object),
at,
n = 25L,
xvals = seq_range(data[[x]], n = n),
level = 0.95,
draw = TRUE,
xlab = x,
ylab = if (match.arg(what) == "effect") paste0("Marginal effect of ", dx) else
paste0("Predicted value"),
xlim = NULL,
ylim = if (match.arg(what) %in% c("prediction", "stackedprediction")) c(0, 1.04) else
NULL,
lwd = 1L,
col = "black",
lty = 1L,
factor.lty = 1L,
factor.pch = 19L,
factor.col = col,
factor.fill = factor.col,
factor.cex = 1L,
xaxs = "i",
yaxs = xaxs,
las = 1L,
scatter = FALSE,
scatter.pch = 19L,
scatter.col = factor.col,
scatter.bg = scatter.col,
scatter.cex = 0.5,
rug = TRUE,
rug.col = col,
rug.size = -0.02,
...
)
# S3 method for multinom
cplot(
object,
x = attributes(terms(object))[["term.labels"]][1L],
dx = x,
what = c("prediction", "classprediction", "stackedprediction", "effect"),
data = prediction::find_data(object),
type = c("response", "link"),
vcov = stats::vcov(object),
at,
n = 25L,
xvals = seq_range(data[[x]], n = n),
level = 0.95,
draw = TRUE,
xlab = x,
ylab = if (match.arg(what) == "effect") paste0("Marginal effect of ", dx) else
paste0("Predicted value"),
xlim = NULL,
ylim = if (match.arg(what) %in% c("prediction", "stackedprediction")) c(0, 1.04) else
NULL,
lwd = 1L,
col = "black",
lty = 1L,
factor.lty = 1L,
factor.pch = 19L,
factor.col = col,
factor.fill = factor.col,
factor.cex = 1L,
xaxs = "i",
yaxs = xaxs,
las = 1L,
scatter = FALSE,
scatter.pch = 19L,
scatter.col = factor.col,
scatter.bg = scatter.col,
scatter.cex = 0.5,
rug = TRUE,
rug.col = col,
rug.size = -0.02,
...
)