predict.hd2part {personalized2part} | R Documentation |
Prediction method for two part fitted objects
Description
Prediction method for two part fitted objects
Usage
## S3 method for class 'hd2part'
predict(
object,
newx,
s = NULL,
model = c("zero", "positive"),
type = c("link", "model_response", "response", "coefficients", "nonzero"),
newoffset = NULL,
...
)
Arguments
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 |
Value
An object depending on the type argument
Examples
set.seed(1)