bife
fitspredict.bife
is a generic function which obtains predictions from an object
returned by bife
.
# S3 method for bife
predict(
object,
type = c("link", "response"),
X_new = NULL,
alpha_new = NULL,
corrected = NULL,
...
)
The function predict.bife
returns a vector of predictions.
an object of class "bife"
.
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"
.
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
.
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
.
deprecated.
other arguments
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.
bife