0
$\begingroup$

I am referring to the documentation here, but it does not give many examples on how to actually perform the test. I have a pandas dataframe with two columns:

  • Column 1 is first day of every week,
  • Column 2 is demand, and this data goes back over 150 weeks.

How would I perform a CH test to see if there is any seasonality in my data?

$\endgroup$

1 Answer 1

0
$\begingroup$

In general this could be achieved with the snippet below where you have to replace x with your observations.

However I'm not sure whether the Caonva-Hansen-Test is suitable for weekly observations (m=52) since these sort of tests are usually designed with monthly or quarterly time series in mind. Therefore it might be better to aggregate your observations to a monthly level (m=12).

from pmdarima.arima import CHTest
import numpy as np
 
x=np.random.normal(size=1000)
CHTest(m=52).estimate_seasonal_differencing_term(x)



$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.