View source: R/mainFunctions.R
qic | R Documentation |
Calculate information criterion for penalized quantile regression models. Currently not exported.
qic(model, n, method = c("BIC", "AIC", "PBIC"))
model |
model from a rq.pen.seq() object |
n |
Sample size |
method |
Choice of BIC, AIC or PBIC, a large p BIC. |
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
.
Ben Sherwood, ben.sherwood@ku.edu
qrbicrqPen
## Not run:
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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.