Abstract
The vinereg R package implements D-vine quantile regression models, supporting both parametric and nonparametric pair-copulas. Based on the methodologies of Kraus and Czado (2017) and Schallhorn et al. (2017), the package provides a robust framework for modeling complex conditional distributions and performing automated variable selection in multivariate contexts.
Introduction: Beyond Mean Regression
Traditional regression models typically focus on estimating the conditional mean of a response variable. However, many applications in fields such as finance, medicine, and ecology require an understanding of the entire conditional distribution, particularly the "tails" (e.g., the 5th or 95th percentiles). While standard quantile regression exists, it frequently struggles with high-dimensional dependencies, non-linearities, and complex tail dependencies where variables correlate differently at extremes.
The vinereg package addresses these limitations by utilizing D-vines (a specific class of vine copulas). By decomposing a multivariate distribution into a sequence of bivariate "pair-copulas," D-vines offer unparalleled flexibility in capturing how predictors interact to influence a response variable across its entire distribution.
Methodology and Implementation
The package follows a sequential estimation approach for D-vine regression. Key technical features include:
- D-Vine Structure: Variables are organized in a path-like structure to facilitate efficient calculation of conditional quantiles.
- Hybrid Modeling: Users can employ parametric pair-copulas (e.g., Gaussian, Clayton, Gumbel) or nonparametric kernels via the
kde1dpackage. - Automated Variable Selection: The
vinereg()function automates covariate selection and ordering based on their contribution to the conditional log-likelihood (CLL), utilizing criteria such as AIC or BIC.
- Discrete Data Support: The package directly handles ordered factors and discrete variables without requiring "jittering" (adding noise), following the approach of Panagiotelis et al. (2012).
- Computational Performance: Core routines are implemented in C++ via
Rcpp, with support for multi-core processing to handle larger datasets.
Key Insights: Distributional Prediction and Visualization
A standout feature of vinereg is its ability to calculate the Conditional Probability Integral Transform (CPIT) and the Conditional PDF. This allows researchers to visualize the full predicted shape of a response variable's distribution for any given set of covariates, rather than a single point estimate.
To aid interpretation, the plot_effects() function provides a way to visualize the "expected effect" of individual variables while accounting for the distributions of all other predictors in the model.
Conclusion and Limitations
While vinereg provides a powerful toolset for quantile regression, users should be mindful of the computational costs associated with high-dimensional nonparametric models. Additionally, the ordering of variables in a D-vine is critical; while the package offers automated selection heuristics, finding the optimal order remains a complex challenge in copula modeling.
References
- Kraus, D., & Czado, C. (2017). D-vine copula based quantile regression. Computational Statistics & Data Analysis.
- Nagler, T. (2025). Package ‘vinereg’: D-Vine Quantile Regression. R Documentation.
Summary updated