knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
An R package for D-vine copula based mean and quantile regression.
the stable release from CRAN:
r
install.packages("vinereg")
the latest development version:
``` r
remotes::install_github("tnagler/vinereg", build_vignettes = TRUE) ```
See the package website.
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)
For more examples, have a look at the vignettes with
vignette("abalone-example", package = "vinereg") vignette("bike-rental", package = "vinereg")
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.