statsmodels.miscmodels.ordinal_model.OrderedModel.predict¶
- OrderedModel.predict(params, exog=None, offset=None, which='prob')[source]¶
Predicted probabilities for each level of the ordinal endog.
- Parameters:
- params
ndarray
Parameters for the Model, (exog_coef, transformed_thresholds).
- exogarray_like,
optional
Design / exogenous data. If exog is None, model exog is used.
- offsetarray_like,
optional
Offset is added to the linear prediction with coefficient equal to 1. If offset is not provided and exog is None, uses the model’s offset if present. If not, uses 0 as the default value.
- which{“prob”, “linpred”, “cumprob”}
Determines which statistic is predicted.
prob : predicted probabilities to be in each choice. 2-dim.
linear : 1-dim linear prediction of the latent variable
x b + offset
cumprob : predicted cumulative probability to be in choice k or lower
- params
- Returns:
- predicted values
ndarray
If which is “prob”, then 2-dim predicted probabilities with observations in rows and one column for each category or level of the categorical dependent variable. If which is “cumprob”, then “prob” ar cumulatively added to get the cdf at k, i.e. probaibility of observing choice k or lower. If which is “linpred”, then the conditional prediction of the latent variable is returned. In this case, the return is one-dimensional.
- predicted values