# What model should I use for this research?

I am currently working on a project dealing with time series data but I have little experience with time series analysis so I was hoping to get some direction on what kind of exploratory data analysis techniques and models I should be looking at, so that I can read up on my own.

I have two weekly time series (movie sales), of which one is a control group. The time series of interest is from a singly country A while the control group is a combination of four other countries. My research question is to examine the impact of an event that happened in country A, using the control as a counter factual to represent actual movie sales in A had the event not happened.

What kind of exploratory data analysis techniques can I use, and what possible models are there for me to directly answer this research question?

• If you're happy with one of the answers perhaps you'd like to accept it? – conjugateprior Dec 16 '12 at 11:23

An example

If you're happy with R you might want to look at the Seatbelts dataset that's built into the base R distribution. It sounds very similar. Like your problem, this consists of several time series of counts (front seat casualties) and an intervention/treatment (imposition of a seatbelt law) that affects only one of them (the front seat passenger sequence) and a bunch of covariates (seasons, petrol prices etc). On the help page you can see what a tiny analysis would look like. You'll notice several things there:

To use count data it's often helpful to log the outcome. That enables you to work with proportional increases rather than absolute ones which is usually what you want. It also allowing you to fake a log linear link without the hassle of fitting a non-linear models.

The basic visual analysis consists of building some model, an ARIMA model in the example, of the series before the intervention and then projecting it forward, and comparing it to what actually happened in the treatment in a plot. The code to do so is the line with the ts.plot

Time series modeling

A simple linear modelling approach, such as you see on the last line of the example, adds an intervention variable to indicate the period, a seasonal component, and an autoregressive term to deal with the autocorrelation. When you are content that the non-intervention variables are well set up, particularly that you have captured any seasonal components, christmas or weekend effects, or whatever it is in your movie sales domain that systematically drive variation in sales without being related to the intervention you are interested in, then you may want to interpret your intervention variable as a causal effect.

In that simple analysis the intervention causes a shift in average level. However, it might have different effects that you'd want to model differently.

What else you'd want to do depends on the model class. For ARIMA modelling the basic issues are 'stationarity' and AR, MA, and seasonal 'order'. It is also possible to take a state space approach. Any good Time Series text will discuss these possibilities. I quite like Shumway and Stoffer (2006) and Commandeur (2007) but there are many good choices, and lots of web material.

Time series analysis can get quite complex quite fast, so taking a graphical exploratory approach first is very sensible, so you know how much time it's worth investing in figuring out these more complex parametric models.

Regression approaches

An alternative, non-time series approach is to treat the problem as a regression discontinuity design. There you compare the the period either side of the intervention to see the causal effect of the intervention. Morgan and Winship (2007) has a discussion of the pros and cons of this approach.

• Firstly, thank you so much for such a detailed response. – statnub Apr 2 '12 at 15:30
• In the example of Seatbelts, after projecting the time series forward and comparing it to the actual data, are there any non-visual ways to test for a deviation between the real data and the predictions? – statnub Apr 2 '12 at 15:39
• I am also thinking of trying different models using this approach. How do you compare how well these models fit the data? I learnt cross validation in my stat classes but they don't really apply here since the data is not IID... – statnub Apr 2 '12 at 15:43
• See the texts mentioned above for answers to both these questions. – conjugateprior Dec 16 '12 at 11:22

First, I would try to put both series on a comparable scale. For example, you might look at the revenue divided by population of movie-going age over time. I would more confident if the two series looked very similar before the event, but then diverged after.

Another approach might be the difference in differences estimator

• Yes, I did that but I used the total population of france and the control group instead. Is that fine? – statnub Apr 2 '12 at 15:46
• For the case of the difference in differences estimator, how do you account for auto-correlation? – statnub Apr 2 '12 at 15:48

To explore the data you could use descriptives and it's very important to plot the data to get a visual representation and a feel for the data. It sounds like a regression could work for you, using dummies for the events and the different countries. Also, you could decide to give the countries a different slope and intercept. Finally, with time-series data, be careful of violations of the assumptions of regression, most specifically autocorrelation. Good luck!