I am using WLS
in statsmodels
to perform weighted least squares. The weights
parameter is set to 1/Variance of my observations
When using wls_prediction_std
as e.g. here I can include the weights as used with WLS
, and this affects the prediction intervals at the in-sample data points. However, if I am using out-of-sample prediction, I do not have variance / weights for my exogenous variables as they are not observations. I can use arbitrary weights, but again the value used affects the prediction intervals.
My question is therefore: is there a robust or rule-of-thumb method to set the weights for out-of-sample prediction using WLS
?
I am not wedded to either statsmodels
or wls_prediction_std
by any means, but any (pointers towards) solutions using Python (libraries) would be preferred.