predict.cv.lrome: make predictions from a "cv.lrome" object.

Description Usage Arguments Details Value References See Also Examples

View source: R/predict.cv.lrome.R

Description

This function makes predictions from a cross-validated lrome model, using the stored "lrome.fit" object, and the optimal value chosen for lambda.

Usage

1
2
## S3 method for class 'cv.lrome'
predict(object, newx, s=c("lambda.1se","lambda.min"),...)

Arguments

object

fitted cv.lrome object.

newx

matrix of new values for x at which predictions are to be made. Must be a matrix. See documentation for predict.lrome.

s

value(s) of the penalty parameter lambda at which predictions are required. Default is the value s="lambda.1se" stored on the CV object. Alternatively s="lambda.min" can be used. If s is numeric, it is taken as the value(s) of lambda to be used.

...

not used. Other arguments to predict.

Details

This function makes it easier to use the results of cross-validation to make a prediction.

Value

The object returned depends the ... argument which is passed on to the predict method for lrome objects.

References

Yang, Y. and Zou, H. (2012), "An Efficient Algorithm for Computing The HHSVM and Its Generalizations," Journal of Computational and Graphical Statistics, 22, 396-415.
BugReport: https://github.com/emeryyi/fastcox.git

Friedman, J., Hastie, T., and Tibshirani, R. (2010), "Regularization paths for generalized linear models via coordinate descent," Journal of Statistical Software, 33, 1.
http://www.jstatsoft.org/v33/i01/

See Also

cv.lrome, and coef.cv.lrome methods.

Examples

1
2
3
4
5
6
7
data(FHT)
set.seed(2011)
cv=cv.lrome(FHT$x, FHT$y,
lambda2 = 1,
lambda.factor=0.05,nfolds=5)
pre = predict(cv$lrome.fit, newx = FHT$x, 
s = cv$lambda.1se)

emeryyi/rome documentation built on May 6, 2019, 9:53 a.m.