Learn R Programming

rqPen (version 4.1.3)

qic.select.rq.pen.seq.cv: Select tuning parameters using IC

Description

Selects tuning parameter \(\lambda\) and a according to information criterion of choice. For a given \(\hat{\beta}\) the information criterion is calculated as $$\log(\sum_{i=1}^n w_i \rho_\tau(y_i-x_i^\top\hat{\beta})) + d*b/(2n),$$ where d is the number of nonzero coefficients and b depends on the method used. For AIC \(b=2\), for BIC \(b=log(n)\) and for PBIC \(d=log(n)*log(p)\) where p is the dimension of \(\hat{\beta}\). If septau set to FALSE then calculations are made across the quantiles. Let \(\hat{\beta}^q\) be the coefficient vector for the qth quantile of Q quantiles. In addition let \(d_q\) and \(b_q\) be d and b values from the qth quantile model. Note, for all of these we are assuming eqn and a are the same. Then the summary across all quantiles is $$\sum_{q=1}^Q w_q[ \log(\sum_{i=1}^n \rho_\tau(y_i-x_i^\top\hat{\beta}^q)) + d_q*b_q/(2n)],$$ where \(w_q\) is the weight assigned for the qth quantile model.

Usage

# S3 method for rq.pen.seq.cv
qic.select(
  obj,
  method = c("BIC", "AIC", "PBIC"),
  septau = ifelse(obj$fit$penalty != "gq", TRUE, FALSE),
  weights = NULL,
  ...
)

Value

coefficients

Coefficients of the selected models.

ic

Information criterion values for all considered models.

modelsInfo

Model info for the selected models related to the original object obj.

gic

Information criterion summarized across all quantiles. Only returned if septau set to FALSE

Arguments

obj

A rq.pen.seq.cv object.

method

Choice of BIC, AIC or PBIC, a large p BIC.

septau

If optimal values of \(\lambda\) and a can vary with \(\tau\). Default is TRUE.

weights

Weights for each quantile. Useful if you set septau to FALSE but want different weights for the different quantiles. If not specified default is to have \(w_q=1\) for all quantiles.

...

Additional arguments.

Author

Ben Sherwood, ben.sherwood@ku.edu

References

qrbicrqPen

Examples

Run this code
set.seed(1)
x <- matrix(runif(800),ncol=8)
y <- 1 + x[,1] + x[,8] + (1+.5*x[,3])*rnorm(100)
m1 <- rq.pen.cv(x,y,penalty="ENet",a=c(0,.5,1),tau=c(.25,.75))
qic.select(m1)

Run the code above in your browser using DataLab