gof.piqr: Goodness of Fit of Penalized Quantile Regression Coefficients...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Goodness of Fit of an object of class “piqr”, usefull to select the best tuning parameter.

Usage

1
gof.piqr(object, method=c("AIC","BIC","GIC","GCV","NIC"), plot=TRUE, ...)

Arguments

object

an object of class “piqr”, the result of a call to piqr.

method

a method to evaluate the goodness of fit and select the best value of the tuning parameter.

plot

if TRUE the chosen method is plotted - default is TRUE.

...

additional arguments.

Details

The best value of lambda is chosen minimizing the criterion, i.e. AIC, BIC, GIC, GCV.

Value

minLambda

the best value of lambda.

dfMinLambda

the number of nonzero parameters associated to the best lambda.

betaMin

the parameters associated to the best lambda.

posMinLambda

the position of the best lambda along the sequence of lambda.

call

the matched call.

Author(s)

Gianluca Sottile gianluca.sottile@unipa.it

See Also

piqr, for model fitting; summary.piqr and plot.piqr, for summarizing and plotting piqr objects.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# using simulated data

set.seed(1234)
n <- 1000
x1 <- rexp(n)
x2 <- runif(n, 0, 5)
x <- cbind(x1,x2)

b <- function(p){matrix(cbind(1, qnorm(p), slp(p, 2)), nrow=4, byrow=TRUE)}
theta <- matrix(0, nrow=3, ncol=4); theta[, 1] <- 1; theta[1,2] <- 1; theta[2:3,3] <- 2
qy <- function(p, theta, b, x){rowSums(x * t(theta %*% b(p)))}

y <- qy(runif(n), theta, b, cbind(1, x))

s <- matrix(1, nrow=3, ncol=4); s[1,3:4] <- 0
obj <- piqr(y ~ x1 + x2, formula.p = ~ I(qnorm(p)) + slp(p, 2), s=s)

best <- gof.piqr(obj, method="AIC", plot=TRUE)

gianluca-sottile/qrcmPen documentation built on May 8, 2019, 9:23 a.m.