The marginal effects of a variable is the expected effect, where expectation is meant with respect to all other variables.

plot_effects(object, alpha = c(0.1, 0.5, 0.9), vars = object$order)

Arguments

object

a vinereg object

alpha

vector of quantile levels.

vars

vector of variable names.

Examples

# simulate data
x <- matrix(rnorm(200), 100, 2)
y <- x %*% c(1, -2)
dat <- data.frame(y = y, x = x, z = as.factor(rbinom(100, 2, 0.5)))

# fit vine regression model
fit <- vinereg(y ~ ., dat)
plot_effects(fit)
#> `geom_smooth()` using method = 'loess' and formula = 'y ~ x'