1
$\begingroup$

I have a time series (TS) of daily Particulate Matter (PM) data for 6 years. My PM data are not normally distributed. The result of the KPSS test returns p-value of 0.01 and t-statistic of 1.53 therefore failing the H0 of trend stationarity. The result of ADF however rejects the H0 and infers (diffrence?)stationarity. The result of the decomposition (using slt) shows clear seasonality (please see attached image). enter image description here

I used The nsdiffs and ndiffs from the R forecast package to calculate the number of seasonal differencing and regular differencing respectively to make the time series stationary. The output returned null for seasonality and 1 for regular diffrencing. Please correct me if I have done wrong so far! forecast::ndiffs(TS[,6]) 1 1

forecast::nsdiffs(TS[,6]) 1 0

My question is why I get null for removing the seasonal removal if there is clear seasonality in my timeseries? Please excuse me if my question is naive as I am new to time series analysis. I appreciate your advise.

$\endgroup$
3
  • $\begingroup$ stats.stackexchange.com/questions/405099/… may be of interest . Please post tour data and I will try and help you further. You don't want to transform you want to incorporate arima into a causal model. $\endgroup$
    – IrishStat
    Apr 30, 2019 at 8:02
  • $\begingroup$ @IrishStat Thank you for your reply. By transformation I meant to de-seasonalize and de-trend my time series. Sorry, I think I chose the wrong term. The original data set is protected but I managed to get another data-set that shows similar trend and seasonality to the original data-set and returns the similar results for nsdiffs and ndiffs. I am not sure how to post the data as it is daily measurements of six years (2011-2016). $\endgroup$
    – Saraz
    May 1, 2019 at 0:49
  • $\begingroup$ After reviewing some curious results suggest illogical day-of-the-week ,,, I closely investigated your data AND it appears you omitted some days ...e.g. 02/26/2011 . Time series analysis requires that each and very period have an observation. Please closely examine and send a corrected data set . $\endgroup$
    – IrishStat
    May 1, 2019 at 14:34

1 Answer 1

2
$\begingroup$

Took your 2193 daily values and introduced them to AUTOBOX which detected both a significant persistent day-of-the-week pattern :day 1 & day2 (Saturday & Sunday) ... both negative and a significant very explicable month of the year pattern (months 4-8 ... all positive and summer months BUT different) and an arima structure (1,0,0) with value .427 ALONG with a number (90) of pulses or one-time anomalies.

Other than adjust for some anomalies .... that was all that was needed to characterize it.

Your series is non-stationary that is a symptom . There are many possible causes that can lead to this symptom. One possible remedy is to adjust for two days of the week and 4 months of the year and anomalous data points. That is your remedy. Your current "procedures" to test for and to remedy non-stationarity might have assumptions regarding remedies.

From https://en.wikipedia.org/wiki/Stationary_process .... a stationary process is a stochastic process whose unconditional joint probability distribution does not change when shifted in time. Consequently, parameters such as mean and variance also do not change over time. Your series has a mean which changes over time due to day-of-the=week and month-of-the-year thus remedial action (model structure ) is required.

The series does not have to be otherwise different to obtain a stationary set. You should also know that if you difference a stationary series you CREATE a non-stationary series.

Here is the Actual, Fit and Forecast

enter image description here

with forecasts for the next 365 days here:

enter image description here

The model is (partially) shown here:

enter image description here

and also here:

enter image description here

&

enter image description here

The plot of the residuals is here:

enter image description here

with acf here:

enter image description here

Finally, the Actual & Cleansed graph highlights the anomalies which might be worth pursuing in order to identify (user)

enter image description here

omitted causal variables.

Hope this helps you.

$\endgroup$
6
  • $\begingroup$ In your second paragraph: "Your series is non-stationary that is a symptom." both adf and KPSS test indicated stationary timeseries: Dickey-Fuller = -26.928, Lag order = 0, p-value = 0.01 KPSS Trend = 0.097148, Truncation lag parameter = 8, p-value = 0.1 $\endgroup$
    – Saraz
    May 3, 2019 at 1:14
  • $\begingroup$ Since I had found that there was non-stationarity BUT YOUR TESTS FAILED TO DO SO as the don't consider a level shift in a daily effect or a monthly effect to "prove non-stationarity. In other words both the tests that you used are INSUFFICIENT to detect non-stationarity as proven by this analysis. Closely read from en.wikipedia.org/wiki/Stationary_process "your unconditional joint probability distribution DOES change when shifted in time due to day-of-the-week , month-of-the-year and the 1 level shift down.. $\endgroup$
    – IrishStat
    May 3, 2019 at 1:20
  • $\begingroup$ did the conclusions surprise you ... the saturday/sunday effect ... the May-Aug factors ? $\endgroup$
    – IrishStat
    May 3, 2019 at 7:33
  • $\begingroup$ In my initial data exploration I used the Kruskal-Wallis H test to check for differences between day of the weeks and also months. The difference were significant. I noticed the seasonality factor in winter months (in southern Hemisphere) as I mentioned in my email. That is why I was confused, that even though the decomposition of my time-series shows seasonality, the "nsdf" returns null. $\endgroup$
    – Saraz
    May 4, 2019 at 1:18
  • $\begingroup$ I create the time series to accommodate two seasonalities (weekly and 4 months): TS <- msts(TS,seasonal.periods = c(7,120),start = decimal_date(as.Date("2011-01-01"))) then performed multiple season decomposition to get a seasonality adjusted time series using tbats: tbats <- tbats(TS[]) my question is if I can adjust for seasonality but removing the two seasonal components? $\endgroup$
    – Saraz
    May 5, 2019 at 4:36

Your Answer

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

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