I want to test heteroscedasticity in time series. The tools in python like: statsmodels.stats.diagnostic.het_breuschpagan require residuals as input obtained by fitting model to data. Since this kind of test relies on the goodness of the model trained. I want to test the heteroscedasticity on time series without training any model, directly on the data itself. So I use McLeod.Li test in R to test it on raw time series. I analyzed individual features have heteroscedasticity. To remove heteroscedasticity, I added 1 to all entries in data (since it has 0 entries) and computed heteroscedasticity the pvalues moved to 0. Why?
1 Answer
You can use the same tests on the raw time series. You are not required to use it on the residuals. That is just what these tests are usually used for (if you are interested in the quality of your model).
However, heteroscedasticity is most easily identified by visual inspection.
-
$\begingroup$ I am new in this domain. Can you please specify how can it be identified using visual inspection? $\endgroup$ Jan 22, 2019 at 4:13
-
$\begingroup$ you can take the first difference and look whether the variability changes over time or looks the same at every sub-segment of the series $\endgroup$– oW_ ♦Jan 22, 2019 at 17:02