plot_effects: Plot marginal effects of a D-vine regression model

View source: R/generics.R

plot_effectsR Documentation

Plot marginal effects of a D-vine regression model

Description

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

Usage

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)

tnagler/vinereg documentation built on Feb. 13, 2024, 3:50 a.m.