predict.hpaSelection: Predict outcome and selection equation values from...

predict.hpaSelectionR Documentation

Predict outcome and selection equation values from hpaSelection model

Description

This function predicts outcome and selection equation values from hpaSelection model.

Usage

## S3 method for class 'hpaSelection'
predict(
  object,
  ...,
  newdata = NULL,
  method = "HPA",
  is_cond = TRUE,
  type = "outcome"
)

Arguments

object

Object of class "hpaSelection"

...

further arguments (currently ignored)

newdata

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.

method

string value indicating prediction method based on hermite polynomial approximation "HPA" or Newey method "Newey".

is_cond

logical; if TRUE (default) then conditional predictions will be estimated. Otherwise unconditional predictions will be returned.

type

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.

Details

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.

Value

This function returns the list which structure depends on method, is_probit and is_outcome values.


hpa documentation built on May 31, 2023, 8:25 p.m.