Package vinereg. August 10, 2018

Similar documents
Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package rvinecopulib

Package fastdummies. January 8, 2018

Package rfsa. R topics documented: January 10, Type Package

Package kdevine. May 19, 2017

Package milr. June 8, 2017

Package bisect. April 16, 2018

Package canvasxpress

Package ECctmc. May 1, 2018

Package BiDimRegression

Package gppm. July 5, 2018

Package docxtools. July 6, 2018

Package widyr. August 14, 2017

Package tidylpa. March 28, 2018

Package vip. June 15, 2018

Package glmnetutils. August 1, 2017

Package balance. October 12, 2018

Package colf. October 9, 2017

Package embed. November 19, 2018

Package deductive. June 2, 2017

Package gggenes. R topics documented: November 7, Title Draw Gene Arrow Maps in 'ggplot2' Version 0.3.2

Package quickreg. R topics documented:

Package validara. October 19, 2017

Package splithalf. March 17, 2018

Package ezsummary. August 29, 2016

Package kdtools. April 26, 2018

Package robotstxt. November 12, 2017

Package sfc. August 29, 2016

Package knitrprogressbar

Package GWRM. R topics documented: July 31, Type Package

Package interplot. R topics documented: June 30, 2018

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package facerec. May 14, 2018

Package qualmap. R topics documented: September 12, Type Package

Package citools. October 20, 2018

Package fcr. March 13, 2018

Package omu. August 2, 2018

Package wrswor. R topics documented: February 2, Type Package

Package MTLR. March 9, 2019

Package WordR. September 7, 2017

Package kerasformula

Package MatchIt. April 18, 2017

Package cosinor. February 19, 2015

Package TrafficBDE. March 1, 2018

Package rsppfp. November 20, 2018

Package reval. May 26, 2015

Package splines2. June 14, 2018

Package climber. R topics documented:

Package ggimage. R topics documented: December 5, Title Use Image in 'ggplot2' Version 0.1.0

Package SEMrushR. November 3, 2018

Package jpmesh. December 4, 2017

Package ggimage. R topics documented: November 1, Title Use Image in 'ggplot2' Version 0.0.7

Package bife. May 7, 2017

Package queuecomputer

Package truncreg. R topics documented: August 3, 2016

Package rgho. R topics documented: January 18, 2017

Package cregulome. September 13, 2018

Package messaging. May 27, 2018

Package palmtree. January 16, 2018

Package epitab. July 4, 2018

Package statip. July 31, 2018

Package sfdct. August 29, 2017

Package preprosim. July 26, 2016

Package barcoder. October 26, 2018

Package tidyimpute. March 5, 2018

Package calpassapi. August 25, 2018

Package catenary. May 4, 2018

Package nngeo. September 29, 2018

Package opencage. January 16, 2018

Package CompGLM. April 29, 2018

Package fitbitscraper

Package tibble. August 22, 2017

Package repec. August 31, 2018

Package ggmosaic. February 9, 2017

Package Cubist. December 2, 2017

Package svalues. July 15, 2018

Package elmnnrcpp. July 21, 2018

Package semver. January 6, 2017

Package bigreadr. R topics documented: August 13, Version Date Title Read Large Text Files

Package bayesdp. July 10, 2018

Package TVsMiss. April 5, 2018

Package projector. February 27, 2018

Package pcr. November 20, 2017

Package censusapi. August 19, 2018

Package gtrendsr. October 19, 2017

Package spark. July 21, 2017

Package auctestr. November 13, 2017

Package gtrendsr. August 4, 2018

Package lucid. August 24, 2018

Package datasets.load

Package fingertipsr. May 25, Type Package Version Title Fingertips Data for Public Health

Package autocogs. September 22, Title Automatic Cognostic Summaries Version 0.1.1

Package modmarg. R topics documented:

Package fitur. March 11, 2018

Package clipr. June 23, 2018

Package edfreader. R topics documented: May 21, 2017

Package mixsqp. November 14, 2018

Package rollply. R topics documented: August 29, Title Moving-Window Add-on for 'plyr' Version 0.5.0

Package triebeard. August 29, 2016

Package labelvector. July 28, 2018

Transcription:

Type Package Title D-Vine Quantile Regression Version 0.5.0 Package vinereg August 10, 2018 Maintainer Thomas Nagler <mail@tnagler.com> Description 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) <arxiv:1705.08310>. License GPL-3 LazyData TRUE Imports cctools, rvinecopulib (>= 0.3.0), future, furrr, kde1d (>= 0.2.0), RoxygenNote 6.1.0 NeedsCompilation no Suggests knitr, rmarkdown, ggplot2, PivotalR, quantreg, tidyr, dplyr, purrr, scales, mgcv, testthat, covr VignetteBuilder knitr URL https://tnagler.github.io/vinereg BugReports https://github.com/tnagler/vinereg/issues Author Thomas Nagler [aut, cre], Dani Kraus [ctb] Repository CRAN Date/Publication 2018-08-09 23:00:03 UTC R topics documented: plot_effects......................................... 2 predict.vinereg....................................... 2 vinereg........................................... 3 Index 6 1

2 predict.vinereg plot_effects Plot marginal effects of a D-vine regression model Description Usage 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 alpha vars a vinereg object vector of quantile levels. vector of variable names. Examples # simulate data x <- matrix(rnorm(300), 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) predict.vinereg Predict conditional mean and quantiles from a D-vine regression model Description Usage Predict conditional mean and quantiles from a D-vine regression model ## S3 method for class 'vinereg' predict(object, newdata, alpha = 0.5, uscale = FALSE,...) ## S3 method for class 'vinereg' fitted(object, alpha = 0.5,...)

vinereg 3 Arguments object newdata alpha uscale... unused. an object of class vinereg. matrix of covariate values for which to predict the quantile. vector of quantile levels; NA predicts the mean based on an average of the 1:10 / 11-quantiles. if TRUE input (newdata) and output is on copula scale. Value A data.frame of quantiles where each column corresponds to one value of alpha. See Also vinereg Examples # simulate data x <- matrix(rnorm(300), 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)) # inspect model summary(fit) plot_effects(fit) # model predictions mu_hat <- predict(fit, newdata = dat, alpha = NA) # mean med_hat <- predict(fit, newdata = dat, alpha = 0.5) # median # observed vs predicted plot(cbind(y, mu_hat)) ## fixed variable order (no selection) (fit <- vinereg(y ~., dat, order = c("x.2", "x.1", "z.1"))) vinereg D-vine regression models

4 vinereg Description Sequential estimation of a regression D-vine for the purpose of quantile prediction as described in Kraus and Czado (2017). If discrete variables are declared as ordered() or factor(), jittering is used to make them continuous (see cctools::cont_conv()). Although this may make the model estimate inconsistent, predictions are usually still reasonable. Usage vinereg(formula, data, family_set = "parametric", selcrit = "loglik", order = NA, par_1d = list(), cores = 1, uscale = FALSE,...) Arguments Value formula data family_set selcrit order par_1d cores uscale an object of class "formula"; same as lm(). data frame (or object coercible by as.data.frame()) containing the variables in the model. see family_set argument of rvinecopulib::bicop(). selection criterion based on conditional log-likelihood. "loglik" (default) imposes no correction; other choices are "aic" and "bic". the order of covariates in the D-vine, provided as vector of variable names (after calling cctools::cont_conv() on the model.frame()); selected automatically if order = NA (default). list of options passed to kde1d::kde1d(), must be one value for each margin, e.g. list(xmin = c(0, 0, NaN)) if the response and first covariate have non-negative support. integer; the number of cores to use for computations. logical indicating whether the data are already on copula scale (no margins have to be fitted).... further arguments passed to rvinecopulib::bicop(). An object of class vinereg. It is a list containing the elements formula the formula used for the fit. selcrit criterion used for variable selection. model_frame the data used to fit the regression model. margins list of marginal models fitted by kde1d::kde1d(). vine an rvinecopulib::vinecop_dist() object containing the fitted D-vine. stats fit statistics such as conditional log-likelihood/aic/bic and p-values for each variable s contribution. order order of the covariates chosen by the variable selection algorithm. selected_vars indices of selected variables. Use predict.vinereg() to predict conditional quantiles. summary.vinereg() shows the contribution of each selected variable with the associated p-value derived from a likelihood ratio test.

vinereg 5 References Kraus and Czado (2017), D-vine copula based quantile regression, Computational Statistics and Data Analysis, 110, 1-18 See Also predict.vinereg Examples # simulate data x <- matrix(rnorm(300), 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)) # inspect model summary(fit) plot_effects(fit) # model predictions mu_hat <- predict(fit, newdata = dat, alpha = NA) # mean med_hat <- predict(fit, newdata = dat, alpha = 0.5) # median # observed vs predicted plot(cbind(y, mu_hat)) ## fixed variable order (no selection) (fit <- vinereg(y ~., dat, order = c("x.2", "x.1", "z.1")))

Index as.data.frame(), 4 fitted.vinereg (predict.vinereg), 2 kde1d::kde1d(), 4 lm(), 4 plot_effects, 2 predict.vinereg, 2, 5 predict.vinereg(), 4 rvinecopulib::bicop(), 4 rvinecopulib::vinecop_dist(), 4 vinereg, 3, 3 6