MyNixOS website logo
Description

D-Vine Quantile Regression.

Implements D-vine quantile regression models with parametric or nonparametric pair-copulas. See Kraus and Czado (2017) <doi:10.1016/j.csda.2016.12.009> and Schallhorn et al. (2017) <doi:10.48550/arXiv.1705.08310>.

vinereg

R-CMD-check Coveragestatus CRANstatus

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

How to install

  • the stable release from CRAN:

    install.packages("vinereg")
    
  • the latest development version:

    # install.packages("remotes")
    remotes::install_github("tnagler/vinereg", build_vignettes = TRUE)
    

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))
#> D-vine regression model: mpg | disp, qsec, hp, drat 
#> nobs = 32, edf = 18.39, cll = -50.08, caic = 136.93, cbic = 163.88

summary(fit)
#>    var      edf         cll       caic       cbic      p_value
#> 1  mpg 0.000000 -100.135440 200.270879 200.270879           NA
#> 2 disp 8.391335   31.185601 -45.588532 -33.289052 2.446502e-10
#> 3 qsec 1.624310    3.907191  -4.565762  -2.184953 1.300182e-02
#> 4   hp 7.371096   11.928452  -9.114713   1.689367 1.576882e-03
#> 5 drat 1.000000    3.038036  -4.076071  -2.610335 1.370252e-02

# show marginal effects for all selected variables
plot_effects(fit)
#> `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
# predict mean and median
head(predict(fit, mtcars, alpha = c(NA, 0.5)), 4)
#>       mean      0.5
#> 1 22.46158 22.35297
#> 2 22.45410 22.35836
#> 3 24.89114 24.60640
#> 4 20.44469 20.44982

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.

Metadata

Version

0.12.1

License

Unknown

Platforms (78)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows