methods-lassogrp {lassogrp} | R Documentation |
Compute fitted values or predictions for "lassogrp"
objects
(typically resulting from lasso()
), or get
(“extract”) other information from such an object.
## S3 method for class 'lassogrp' fitted(object, ...) ## S3 method for class 'lassogrp' predict(object, newdata = NULL, type = c("link", "response"), na.action = na.pass, ...) ## S3 method for class 'lassogrp' formula(x, ...)
object,x |
an object of class |
newdata |
data.frame containing the new regressors for which the predictions are required. |
type |
type of prediction |
na.action |
action for missing values, see |
... |
not used (needed for compatibility) |
The fitted values are equal to response predictions for the observations used for fitting.
matrix of fitted or predicted values. Columns correspond to lambda values,
rows, to observations in newdata
.
Werner Stahel, stahel@stat.math.ethz.ch
data(asphalt) dd <- asphalt rr <- lasso(log10(RUT)~log10(VISC)+ASPH+BASE+FINES+VOIDS+RUN, data=dd) fitted(rr) predict(rr, newdata= data.frame(VISC=2, ASPH=5, BASE=5, VOIDS=5, FINES=70, RUN=1))