knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

vinereg

R build status CRAN status

An R package for D-vine copula based mean and quantile regression.

How to install

Functionality

See the package website.

Example

set.seed(5)
library(vinereg)
data(mtcars)

# declare factors and discrete variables
for (var in c("cyl", "vs", "gear", "carb"))
    mtcars[[var]] <- as.ordered(mtcars[[var]])
mtcars[["am"]] <- as.factor(mtcars[["am"]])

# fit model
(fit <- vinereg(mpg ~ ., family = "nonpar", data = mtcars))

summary(fit)

# show marginal effects for all selected variables
plot_effects(fit)

# predict mean and median
head(predict(fit, mtcars, alpha = c(NA, 0.5)), 4)

Vignettes

For more examples, have a look at the vignettes with

vignette("abalone-example", package = "vinereg")
vignette("bike-rental", package = "vinereg")

References

Kraus and Czado (2017). D-vine copula based quantile regression. Computational Statistics \& Data Analysis, 110, 1-18. link, preprint

Schallhorn, N., Kraus, D., Nagler, T., Czado, C. (2017). D-vine quantile regression with discrete variables. Working paper, preprint.



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