diff --git a/DESCRIPTION b/DESCRIPTION index 76ed4f1..b35c966 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: vinereg Type: Package Title: D-Vine Quantile Regression -Version: 0.9.0 +Version: 0.9.1 Authors@R: c( person("Thomas", "Nagler",, "mail@tnagler.com", role = c("aut", "cre")), person("Dani", "Kraus",,, role = c("ctb")) diff --git a/NEWS.md b/NEWS.md index de8d813..1184621 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,11 @@ -# vinereg 0.9.0 +# vinereg 0.9.1 + +BUG FIX + +* fix unnecessary error when calling `vinereg()` with weights. + + + # vinereg 0.9.0 NEW FEATURE diff --git a/docs/404.html b/docs/404.html index 298c358..174e89a 100644 --- a/docs/404.html +++ b/docs/404.html @@ -32,7 +32,7 @@ vinereg - 0.9.0 + 0.9.1 @@ -103,8 +103,7 @@

Page not found (404)

-

Site built with pkgdown -2.0.1.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index ccba17d..66722ae 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -17,7 +17,7 @@ vinereg - 0.9.0 + 0.9.1 @@ -750,8 +750,7 @@

License

-

Site built with pkgdown -2.0.1.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/articles/index.html b/docs/articles/index.html index 74aac63..d6c9ec6 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -17,7 +17,7 @@ vinereg - 0.9.0 + 0.9.1 @@ -77,8 +77,7 @@

All vignettes

-

Site built with pkgdown -2.0.1.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/authors.html b/docs/authors.html index a05f164..cec33c9 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -17,7 +17,7 @@ vinereg - 0.9.0 + 0.9.1 @@ -80,13 +80,13 @@

Citation

Nagler T (2023). vinereg: D-Vine Quantile Regression. -R package version 0.9.0, https://tnagler.github.io/vinereg/. +R package version 0.9.1, https://tnagler.github.io/vinereg/.

@Manual{,
   title = {vinereg: D-Vine Quantile Regression},
   author = {Thomas Nagler},
   year = {2023},
-  note = {R package version 0.9.0},
+  note = {R package version 0.9.1},
   url = {https://tnagler.github.io/vinereg/},
 }
@@ -101,8 +101,7 @@

Citation

-

Site built with pkgdown -2.0.1.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/index.html b/docs/index.html index 7e796c9..9608640 100644 --- a/docs/index.html +++ b/docs/index.html @@ -37,7 +37,7 @@ vinereg - 0.9.0 + 0.9.1 @@ -87,9 +87,8 @@
- -

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

+

R build status Coverage status CRAN status

+

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

How to install

@@ -108,8 +107,7 @@

How to install

Functionality

-

See the package -website.

+

See the package website.

Example @@ -156,11 +154,8 @@

Vignettes

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.

+

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.

@@ -199,14 +194,7 @@

Developers

-
-

Dev status

- -
+ @@ -219,8 +207,7 @@

Dev status

-

Site built with pkgdown -2.0.1.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 565abb8..d4acc58 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,8 +1,8 @@ pandoc: 3.1.1 -pkgdown: 2.0.1 +pkgdown: 2.0.7 pkgdown_sha: ~ articles: abalone-example: abalone-example.html bike-rental: bike-rental.html -last_built: 2023-06-26T13:47Z +last_built: 2023-10-18T15:06Z diff --git a/docs/reference/cll.html b/docs/reference/cll.html index 2762863..29f1b06 100644 --- a/docs/reference/cll.html +++ b/docs/reference/cll.html @@ -17,7 +17,7 @@ vinereg - 0.9.0 + 0.9.1 @@ -66,36 +66,41 @@

Conditional log-likelihood

-
cll(object, newdata, cores = 1)
+
cll(object, newdata, cores = 1)

Arguments

object

an object of class vinereg.

+ +
newdata

matrix of response and covariate values for which to compute the conditional distribution.

+ +
cores

integer; the number of cores to use for computations.

+

Examples

-
# \dontshow{
-set.seed(1)
-# }
-# simulate data
-x <- matrix(rnorm(500), 250, 2)
-y <- x %*% c(1, -2)
-dat <- data.frame(y = y, x = x, z = as.factor(rbinom(250, 2, 0.5)))
-
-# fit vine regression model
-fit <- vinereg(y ~ ., dat)
-
-cll(fit, dat)
+    
# \dontshow{
+set.seed(1)
+# }
+# simulate data
+x <- matrix(rnorm(500), 250, 2)
+y <- x %*% c(1, -2)
+dat <- data.frame(y = y, x = x, z = as.factor(rbinom(250, 2, 0.5)))
+
+# fit vine regression model
+fit <- vinereg(y ~ ., dat)
+
+cll(fit, dat)
 #> [1] 325.684
-fit$stats$cll
+fit$stats$cll
 #> [1] 325.684
 
@@ -111,8 +116,7 @@

Examples

-

Site built with pkgdown -2.0.1.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/cpit.html b/docs/reference/cpit.html index 0fb5662..8421bde 100644 --- a/docs/reference/cpit.html +++ b/docs/reference/cpit.html @@ -17,7 +17,7 @@ vinereg - 0.9.0 + 0.9.1 @@ -66,34 +66,39 @@

Conditional probability integral transform

-
cpit(object, newdata, cores = 1)
+
cpit(object, newdata, cores = 1)

Arguments

object

an object of class vinereg.

+ +
newdata

matrix of response and covariate values for which to compute the conditional distribution.

+ +
cores

integer; the number of cores to use for computations.

+

Examples

-
# \dontshow{
-set.seed(1)
-# }
-# simulate data
-x <- matrix(rnorm(500), 250, 2)
-y <- x %*% c(1, -2)
-dat <- data.frame(y = y, x = x, z = as.factor(rbinom(250, 2, 0.5)))
-
-# fit vine regression model
-fit <- vinereg(y ~ ., dat)
-
-hist(cpit(fit, dat)) # should be approximately uniform
+    
# \dontshow{
+set.seed(1)
+# }
+# simulate data
+x <- matrix(rnorm(500), 250, 2)
+y <- x %*% c(1, -2)
+dat <- data.frame(y = y, x = x, z = as.factor(rbinom(250, 2, 0.5)))
+
+# fit vine regression model
+fit <- vinereg(y ~ ., dat)
+
+hist(cpit(fit, dat)) # should be approximately uniform
 
 
@@ -109,8 +114,7 @@

Examples

-

Site built with pkgdown -2.0.1.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/index.html b/docs/reference/index.html index 49487cc..35f09e0 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -17,7 +17,7 @@ vinereg - 0.9.0 + 0.9.1 @@ -96,8 +96,7 @@

All functions
-

Site built with pkgdown -2.0.1.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/plot_effects.html b/docs/reference/plot_effects.html index 0008e5f..cf82de5 100644 --- a/docs/reference/plot_effects.html +++ b/docs/reference/plot_effects.html @@ -18,7 +18,7 @@ vinereg - 0.9.0 + 0.9.1 @@ -68,30 +68,35 @@

Plot marginal effects of a D-vine regression model

-
plot_effects(object, alpha = c(0.1, 0.5, 0.9), vars = object$order)
+
plot_effects(object, alpha = c(0.1, 0.5, 0.9), vars = object$order)

Arguments

object

a vinereg object

+ +
alpha

vector of quantile levels.

+ +
vars

vector of variable names.

+

Examples

-
# simulate data
-x <- matrix(rnorm(200), 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)
-#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'
+    
# simulate data
+x <- matrix(rnorm(200), 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)
+#> `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
 
 
@@ -107,8 +112,7 @@

Examples

-

Site built with pkgdown -2.0.1.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/predict.vinereg.html b/docs/reference/predict.vinereg.html index 63523d1..9260e47 100644 --- a/docs/reference/predict.vinereg.html +++ b/docs/reference/predict.vinereg.html @@ -17,7 +17,7 @@ vinereg - 0.9.0 + 0.9.1 @@ -66,30 +66,41 @@

Predict conditional mean and quantiles from a D-vine regression model

-
# S3 method for vinereg
-predict(object, newdata, alpha = 0.5, cores = 1, ...)
-
-# S3 method for vinereg
-fitted(object, alpha = 0.5, ...)
+
# S3 method for vinereg
+predict(object, newdata, alpha = 0.5, cores = 1, ...)
+
+# S3 method for vinereg
+fitted(object, alpha = 0.5, ...)

Arguments

object

an object of class vinereg.

+ +
newdata

matrix of covariate values for which to predict the quantile.

+ +
alpha

vector of quantile levels; NA predicts the mean based on an average of the 1:10 / 11-quantiles.

+ +
cores

integer; the number of cores to use for computations.

+ +
...

unused.

+

Value

-

A data.frame of quantiles where each column corresponds to one + + +

A data.frame of quantiles where each column corresponds to one value of alpha.

@@ -99,36 +110,36 @@

See also

Examples

-
# simulate data
-x <- matrix(rnorm(200), 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))
+    
# simulate data
+x <- matrix(rnorm(200), 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))
 #> D-vine regression model: y | x.2, x.1 
 #> nobs = 100, edf = 2, cll = 12.48, caic = -20.95, cbic = -15.74 
-
-# inspect model
-summary(fit)
+
+# inspect model
+summary(fit)
 #>   var edf        cll      caic      cbic      p_value
 #> 1   y   0 -214.61264  429.2253  429.2253           NA
 #> 2 x.2   1   68.82503 -135.6501 -133.0449 8.692058e-32
 #> 3 x.1   1  158.26435 -314.5287 -311.9235 8.261084e-71
-plot_effects(fit)
-#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'
+plot_effects(fit)
+#> `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
 
-
-# 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))
+
+# 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")))
+
+## fixed variable order (no selection)
+(fit <- vinereg(y ~ ., dat, order = c("x.2", "x.1", "z.1")))
 #> D-vine regression model: y | x.2, x.1, z.1 
 #> nobs = 100, edf = 2, cll = 12.48, caic = -20.95, cbic = -15.74 
 
@@ -145,8 +156,7 @@

Examples

-

Site built with pkgdown -2.0.1.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/vinereg.html b/docs/reference/vinereg.html index 4a19772..6c3f2c3 100644 --- a/docs/reference/vinereg.html +++ b/docs/reference/vinereg.html @@ -18,7 +18,7 @@ vinereg - 0.9.0 + 0.9.1
@@ -68,55 +68,76 @@

D-vine regression models

-
vinereg(
-  formula,
-  data,
-  family_set = "parametric",
-  selcrit = "aic",
-  order = NA,
-  par_1d = list(),
-  weights = numeric(),
-  cores = 1,
-  ...,
-  uscale = FALSE
-)
+
vinereg(
+  formula,
+  data,
+  family_set = "parametric",
+  selcrit = "aic",
+  order = NA,
+  par_1d = list(),
+  weights = numeric(),
+  cores = 1,
+  ...,
+  uscale = FALSE
+)

Arguments

formula

an object of class "formula"; same as lm().

+ +
data

data frame (or object coercible by as.data.frame()) containing the variables in the model.

+ +
family_set

see family_set argument of rvinecopulib::bicop().

+ +
selcrit

selection criterion based on conditional log-likelihood. "loglik" (default) imposes no correction; other choices are "aic" and "bic".

+ +
order

the order of covariates in the D-vine, provided as vector of variable names (after calling vinereg:::expand_factors(model.frame(formula, data))); selected automatically if order = NA (default).

+ +
par_1d

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.

+ +
weights

optional vector of weights for each observation.

+ +
cores

integer; the number of cores to use for computations.

+ +
...

further arguments passed to rvinecopulib::bicop().

+ +
uscale

if TRUE, vinereg assumes that marginal distributions have been taken care of in a preliminary step.

+

Value

-

An object of class vinereg. It is a list containing the elements

formula
+ + +

An object of class vinereg. It is a list containing the elements

formula

the formula used for the fit.

selcrit
@@ -142,7 +163,10 @@

Value

indices of selected variables.

Use -predict.vinereg() to predict conditional quantiles. summary.vinereg()shows the contribution of each selected variable with the associated +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.

@@ -166,36 +190,36 @@

See also

Examples

-
# simulate data
-x <- matrix(rnorm(200), 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))
+    
# simulate data
+x <- matrix(rnorm(200), 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))
 #> D-vine regression model: y | x.2, x.1 
 #> nobs = 100, edf = 2, cll = 17.47, caic = -30.94, cbic = -25.73 
-
-# inspect model
-summary(fit)
+
+# inspect model
+summary(fit)
 #>   var edf        cll      caic      cbic      p_value
 #> 1   y   0 -218.94275  437.8855  437.8855           NA
 #> 2 x.2   1   73.02642 -144.0528 -141.4477 1.264121e-33
 #> 3 x.1   1  163.38599 -324.7720 -322.1668 4.851392e-73
-plot_effects(fit)
-#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'
+plot_effects(fit)
+#> `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
 
-
-# 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))
+
+# 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")))
+
+## fixed variable order (no selection)
+(fit <- vinereg(y ~ ., dat, order = c("x.2", "x.1", "z.1")))
 #> D-vine regression model: y | x.2, x.1, z.1 
 #> nobs = 100, edf = 2, cll = 17.47, caic = -30.94, cbic = -25.73 
 
@@ -212,8 +236,7 @@

Examples

-

Site built with pkgdown -2.0.1.

+

Site built with pkgdown 2.0.7.