predict.hrq_glasso {hrqglas} | R Documentation |
Prediction for the hrq_glasso object
Description
This function provides the prediction of the hrq_glasso
object.
Usage
## S3 method for class 'hrq_glasso'
predict(object, newX, s = NULL, ...)
Arguments
object |
The model object of |
newX |
New design matrix. |
s |
Value of lambda. Default is NULL, so that the function provides prediction at all lambdas used in |
... |
other input parameters. |
Value
The function returns predicted values based on the fitted model from hrq_glasso
.
Examples
n<- 100
p<- 10
x0<- matrix(rnorm(n*p),n,p)
X<- cbind(x0, x0^2, x0^3)[,order(rep(1:p,3))]
y<- -2+X[,1]+0.5*X[,2]-X[,3]-0.5*X[,7]+X[,8]-0.2*X[,9]+rt(n,2)
group<- rep(1:p, each=3)
fit<- hrq_glasso(X, y, group)
pred<- predict(fit, newX=X, s=0.3)
[Package hrqglas version 1.1.0 Index]