Closed humanpaingeneticslab closed 4 days ago
Sorry for the late reply, Yes, the function returns a list that contains a model object, which is a fit model that could be used for the prediction. The code you use here is right for the downstream analysis.
Qi
Hello,
I'm not sure how to use the results of call the 'VSOLassoBag' :-/
For example, I would like to know which genes were selected, and how to use these genes to classify new samples.
For example, can I do this:
----- call bagged lasso
jj <- VSOLassoBag( ..., post.regression=TRUE, post.LASSO=TRUE )
----- predict new samples
cv.fit <- jj[["model"]] best_lambda <- cv.fit[[ "lambda.1se" ]] pr <- predict( cv.fit, s=best_lambda, newx=..., type="response" )
----- get list of genes and their LASSO weights
cf <- coef( cv.fit, s=best_lambda )
??? Thanks!