utils.unifend
utils.unifend(model, y=None)
Calculate the endpoints of the uniform residual distributions.
For each observation, this function computes the lower and upper bounds of the predicted cumulative distribution function, P(Y < y) and P(Y <= y).
Parameters
| model |
object |
A fitted model object from the statsmodels library. |
required |
| y |
np.ndarray |
The observed response variable. If not provided, it will be extracted from the model object. |
None |
Returns
|
np.ndarray |
An (n x 2) array where n is the number of observations. Each row contains the [lower, upper] endpoint for a residual’s uniform distribution. |
Raises
|
ValueError |
If the model type is not a recognized statsmodels model. |