Learn R Programming

rqPen (version 4.1.3)

qic: Calculate information criterion for penalized quantile regression models. Currently not exported.

Description

Calculate information criterion for penalized quantile regression models. Currently not exported.

Usage

qic(model, n, method = c("BIC", "AIC", "PBIC"))

Value

Let \(\hat{\beta}\) be the coefficient vectors for the estimated model. Function returns the value $$\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}\). The values of w_i default to one and are set using weights when fitting the models. Returns this value for each coefficient vector in the model, so one for every value of \(\lambda\).

Arguments

model

model from a rq.pen.seq() object

n

Sample size

method

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

Author

Ben Sherwood, ben.sherwood@ku.edu

References

qrbicrqPen

Examples

Run this code
if (FALSE) {
set.seed(1)
x <- matrix(runif(800),ncol=8)
y <- 1 + x[,1] + x[,8] + (1+.5*x[,3])*rnorm(100)
m1 <- rq.pen(x,y,tau=c(.25,.75))
# returns the IC values for tau=.25
qic(m1$models[[1]],m1$n) 
# returns the IC values for tau=.75
qic(m1$models[[2]],m1$n)
} 

Run the code above in your browser using DataLab