predict.bife {bife}R Documentation

Predict method for bife fits

Description

predict.bife is a generic function which obtains predictions from an object returned by bife.

Usage

## S3 method for class 'bife'
predict(
  object,
  type = c("link", "response"),
  X_new = NULL,
  alpha_new = NULL,
  corrected = NULL,
  ...
)

Arguments

object

an object of class "bife".

type

the type of prediction required. "link" is on the scale of the linear predictor whereas "response" is on the scale of the response variable. Default is "link".

X_new

a data.frame or a regressor matrix for predictions. If not supplied predictions are based on the regressor matrix returned by the object bife. See Details.

alpha_new

a scalar or vector of fixed effects. If not supplied predictions are based on the vector of fixed effects returned by bife or the average. See Details.

corrected

deprecated.

...

other arguments

Details

The model frame returned by the object bife only includes individuals that were not dropped before the fitting process (due to perfect classification). The linear predictors of perfectly classified observations are equal to - Inf or Inf whereas the predicted probabilities are equal to their response. In-sample predictions are only based on non-perfectly classified observations.

If alpha_new is supplied as a scalar the linear predictor is computed using the same value of the fixed effect for each observation. If alpha_new is supplied as a vector it has to be of same length as the rows of the corresponding regressor matrix. If only X_new is provided but not alpha_new, we use the average.

Value

The function predict.bife returns a vector of predictions.

See Also

bife


[Package bife version 0.7.2 Index]