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,
...
)fitted "hd2part" model object
Matrix of new values for x at which predictions are to be made. Must be a matrix
This argument is not used for type=c("coefficients","nonzero")
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.
either "zero" for the zero part model or "positive" for the positive part model
Type of prediction required. type = "link" gives the linear predictors;
type = "model_response" gives the fitted probabilities for the zero part and fitted expected values for the positive part.
type = "response" gives the combined response prediction across the two models using the full unconditional expected
value of the response. When type = "response", argument "model" is unused.
type = "coefficients" computes the coefficients at the requested values for s.
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