Skip to content

Latest commit

 

History

History
65 lines (46 loc) · 1.83 KB

README.md

File metadata and controls

65 lines (46 loc) · 1.83 KB

C-vine regression

CRAN status R-CMD-check version

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

Installation

You can install the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("jobstdavid/cvinereg")

Example

library(cvinereg)

# simulate data
set.seed(2024)
x <- matrix(rnorm(200), 100, 2)
y <- x %*% c(1, -2)
data <- data.frame(y = y, x = x)

# fit vine regression model
(fit <- cvinereg(y ~ ., data))
#> C-vine regression model: y | x.2, x.1 
#> nobs = 100, edf = 3, cll = 67.44, caic = -128.88, cbic = -121.07

# summary of fit
summary(fit)
#>   var edf       cll      caic      cbic      p_value
#> 1   y   0 -221.3855  442.7710  442.7710           NA
#> 2 x.2   1   79.0774 -156.1548 -153.5496 2.862975e-36
#> 3 x.1   2  209.7498 -415.4996 -410.2892 8.069092e-92

# show marginal effects for all selected variables
plot_effects(fit)
#> `geom_smooth()` using method = 'loess' and formula = 'y ~ x'

Contact

Feel free to contact jobstd@uni-hildesheim.de if you have any questions or suggestions.

References