4
$\begingroup$

The time series I want to model has several shocks due to law changes. Basically, I do not have a lot of data that isn't impacted by these shocks/shifts/pulses. Now, I want to study the ACF and PACF of the series- is the auto-correlation still useful for modelling the series knowing that the shocks disturb the "real" data? Also, how do I deal with shocks when I want to study the cross correlation with another time series.

ACF and PACF of the original data:

ACF and PACF of the original data:

$\endgroup$
  • $\begingroup$ drop the data points with shocks? $\endgroup$ – Aksakal Jan 4 '19 at 21:39
  • $\begingroup$ The thing is, the shocks have lags, like a shift or a pulse. i would need to modify several years of data $\endgroup$ – Charlotte Jan 4 '19 at 21:45
  • 2
    $\begingroup$ In this case you cannot run ACF/PACF directly on the series, you'd have to build a model with shocks in it, then run autocorrelation on errors $\endgroup$ – Aksakal Jan 4 '19 at 22:02
  • $\begingroup$ Do you mean an Intervention Model ? What is autocorrelation in error used for? $\endgroup$ – Charlotte Jan 4 '19 at 22:44
2
$\begingroup$

Determine best ARIMA model with AICc and RMSE might be of interest. If you know the dates of the shocks then one can form an ARMAX model incorporating any lead and lag effects including dynamic effects. If you don't know the dates of the shocks then you can use Tsay's procedures as outlined here http://docplayer.net/12080848-Outliers-level-shifts-and-variance-changes-in-time-series.html

iN RESPONSE: How to fit a robust step function to a time series? suggests that shocks can be both 1 period events (pulses) or step events . The work of Tsay suggests ways to identify the nature of the Intervention.

If you have a sequence of contiguous pulses they can often be collected/aggregated into a dynamic pulse. This could be evident from a decay pattern.

I prefer to empirically identify the shocks and then to possibly re-parameterize.

If you wish to continue this offline , I will try and help you as it may require some data analysis.

I also have referred readers to Intervention Analysis Coding in R TSA Package ... some caveats 1) it requires the user to specify the arima model AND it doesn't work with user-suggested causals.

AFTER RECEIPT OF DATA:

You sent 54 monthly values for two time series. Here is the plot of the dependent series CA and the user suggested predictor PR enter image description here. The general approach is called ARMAX modelling enter image description here

There are a number of issues to be identified via analytics:

  1. Is there seasonality (annual repetitive features) and if so is the seasonal structure autoregressive (SARIMA)or seasonally deterministic ( i.e the need for seasonal dummies )

  2. What differencing or de-meaning is necessary

3.) what is the form of the ARIMA structure

4) Are there unuusal values that need to be dealt with ( THE I'S)

5) Is there evidence of non-constant error variance or non-constant parameters over time in the residuals ( THE A'S )

6) What is the form of the relationship ( THE X'S )

Using AUTOBOX (a time series package that I have helped to develop ) I obtained answers to these questions in the form of a model that only contained statistically significant parameters and generated a plausible model.

The Actual/Fit and Forecast graph is here enter image description here and a less busy Actual and Forecast graph here enter image description here

The residuals appear to be relatively free of structure enter image description here with ACF here enter image description here

The forecasts for the next 36 period are presented here enter image description here

The final model is developed through a sequence of interim models much like peeling an onion where model diagnostics ( tests of sufficiency and necessity ) are used to ultimately separate signal and noise enter image description here AND here enter image description here. The Actual and Cleansed graph is informative about the identified anomalies enter image description here

The dependent series suffered a number of "shocks" i.e. external policy effects while still being associated with the input series. These shocks were empirically found and as you suggested explicable due to policy changes. The model reflects these external condiderations .

$\endgroup$
  • $\begingroup$ I know the date of the shocks. Do you know where I can find more information on how to incorporate theses shocks (Methodology)? $\endgroup$ – Charlotte Jan 5 '19 at 15:11
  • $\begingroup$ I am finding a lot of information on how to detect shocks but not on how to model them with the method you mentioned. $\endgroup$ – Charlotte Jan 5 '19 at 15:41
1
$\begingroup$

If you know the date that each law passed, and assume the shocks would occur after that date, you can model the impact of the shocks using a single exponential distribution, with the sample mean being the average impact of each shock.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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