predict.bife {bife} | R Documentation |
bife
fitspredict.bife
is a generic function which obtains predictions from an object
returned by bife
.
## S3 method for class 'bife' predict( object, type = c("link", "response"), X_new = NULL, alpha_new = NULL, corrected = NULL, ... )
object |
an object of class |
type |
the type of prediction required. |
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 |
alpha_new |
a scalar or vector of fixed effects. If not supplied predictions are based on the
vector of fixed effects returned by |
corrected |
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.
The function predict.bife
returns a vector of predictions.