View source: R/nckqr-methods.R
predict.nckqr | R Documentation |
nckqr
object.Predict the fitted values for a nckqr
object.
## S3 method for class 'nckqr'
predict(object, x, newx = NULL, s2, s1 = NULL, ...)
object |
A fitted |
x |
The predictor matrix, i.e., the |
newx |
A matrix of new values for |
s2 |
Value of the penalty parameter 'lambda2' at which predictions are required. |
s1 |
Value(s) of the penalty parameter 'lambda1' at which predictions are required. Default is the entire sequence used to create the model. |
... |
Not used. |
Returns the fitted values for the non-crossing kernel quantile regression model.
library(MASS)
data(GAGurine)
x <- as.matrix(GAGurine$Age)
y <- GAGurine$GAG
l2 <- 1e-4
ttau <- c(0.1, 0.3, 0.5, 0.7, 0.9)
l1_list <- 10^seq(-8, 2, length.out=10)
fit <- nckqr(x,y, lambda1=l1_list, lambda2=l2, tau=ttau)
predict(fit, x, tail(x), s1=l1_list[1:3], s2=1e-4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.