Get predictions from a glmnetfit fit object
Gives fitted values, linear predictors, coefficients and number of non-zero
coefficients from a fitted glmnetfit
object.
## S3 method for class 'glmnetfit' predict( object, newx, s = NULL, type = c("link", "response", "coefficients", "nonzero"), exact = FALSE, newoffset, ... )
object |
Fitted "glmnetfit" object. |
newx |
Matrix of new values for |
s |
Value(s) of the penalty parameter lambda at which predictions are required. Default is the entire sequence used to create the model. |
type |
Type of prediction required. Type "link" gives the linear predictors (eta scale); Type "response" gives the fitted values (mu scale). Type "coefficients" computes the coefficients at the requested values for s. Type "nonzero" returns a list of the indices of the nonzero coefficients for each value of s. |
exact |
This argument is relevant only when predictions are made at values
of |
newoffset |
If an offset is used in the fit, then one must be supplied for making predictions (except for type="coefficients" or type="nonzero"). |
... |
This is the mechanism for passing arguments like |
The object returned depends on type.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.