statsmodels.regression.linear_model.PredictionResults.conf_int¶
-
PredictionResults.conf_int(obs=
False, alpha=0.05)[source]¶ Confidence or prediction interval for the predicted values.
- Parameters:¶
- obsbool,
optional If False (default), return the confidence interval for the mean prediction, using the standard error of the mean (
se_mean). If True, return the prediction interval for a new observation, using the standard error of the observation (se_obs), which also accounts for the residual variance.- alpha
float,optional The significance level for the confidence interval. ie., The default alpha = .05 returns a 95% confidence interval.
- obsbool,
- Returns:¶
- ci
ndarray, (nobs, 2) The lower and upper bound of the interval for each observation. Column 0 contains the lower bound, column 1 the upper bound.
- ci