View source: R/hrq_glasso_predict.R
predict.hrq_glasso | R Documentation |
This function provides the prediction of the hrq_glasso
object.
## S3 method for class 'hrq_glasso' predict(object, newX, s = NULL, ...)
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. |
The function returns predicted values based on the fitted model from hrq_glasso
.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.