This function predicts outcome and selection equation values from hpaSelection model.
# S3 method for hpaSelection
predict(object, ..., newdata = NULL,
method = "HPA", is_cond = TRUE, is_outcome = TRUE)
Object of class "hpaSelection"
further arguments (currently ignored)
An optional data frame (for hpaBinary and hpaSelection) or numeric matrix (for hpaML) in which to look for variables with which to predict. If omitted, the original dataframe (matrix) used.
string value indicating prediction method based on hermite polynomial approximation "HPA" or Newey method "Newey".
logical; if TRUE
(default) then conditional predictions will be estimated. Otherwise unconditional predictions will be returned.
logical; if TRUE
(default) then predictions for selection equation will be estimated using "HPA" method.
Otherwise selection equation predictions (probabilities) will be returned.
This function returns the list which structure depends on method
, is_probit
and is_outcome
values.
Note that Newey method can't predict conditional outcomes for zero selection equation value. Conditional probabilities for selection equation could be estimated only when dependent variable from outcome equation is observable.