Prediction method for two part fitted objects
# S3 method for hd2part predict( object, newx, s = NULL, model = c("zero", "positive"), type = c("link", "model_response", "response", "coefficients", "nonzero"), newoffset = NULL, ... )
| object | fitted "hd2part" model object |
|---|---|
| newx | Matrix of new values for |
| s | Value(s) of the penalty parameter lambda for the zero part at which predictions are required. Default is the entire sequence used to create the model. |
| model | either |
| type | Type of prediction required. |
| newoffset | f an offset is used in the fit, then one must be supplied for making predictions |
| ... | not used |
An object depending on the type argument
set.seed(1)