I have a very similar problem to this question and it works for the training data. Now I´m trying to get the confidence interval for the predicted data:
from statsmodels.sandbox.regression.predstd import wls_prediction_std
#define y, X, X_forecast as pandas dataframes
regressor = sm.api.OLS(y, X).fit()
wls_prediction_std(regressor.predict(X_forecast))
But, of course, gives an error complaining about regressor.predict
being an array. How can I calculate the confidence interval for the predicted regression values?