This function predicts outcome and selection equation values from hpaSelection model.
# S3 method for hpaSelection
predict(
object,
...,
newdata = NULL,
method = "HPA",
is_cond = TRUE,
type = "outcome"
)
This function returns the list which structure
depends on method
, is_probit
and is_outcome
values.
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 data frame (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.
character; if "outcome" (default) then predictions for
selection equation will be estimated according to method
.
If "selection" then selection equation predictions (probabilities)
will be returned.
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.