# Correct algorithm for detecting outbreaks in conflict data

I'm currently working on a project researching whether Google Trends can predict conflict events in intrastate conflicts.

Thus I have two different datasets; the weekly Google Trends search volume and the number of conflict events per week. My idea was to do the following to test my hypothesis:

1. Use an outbreak detection algorithm from the R-package surveillance. This will give me binomial values (outbreak/no outbreak) for each week in my datasets. The idea was that those algorithms would be able to correctly and automatically identify "peaks" in my data.

2. Evaluate the binomial classifiers (so if there was an "outbreak" in the Google Trends data for week t and there is an "outbreak" in the conflict data in week t+1 I'd have a true positive etc.).

I am, however not totally sure, which algorithm provided in the package would be suitable for my kind of data (which I assume does not follow seasonal trends as strongly as disease data), since my background is not in epidemiology and my knowledge of statistics is quite limited. I would thus be thankful for hints or advice!

• Interesting project. I'd push back a bit on your assumption that there is no seasonality. Plenty of econometric uses weather as an instrument for conflict, exploiting the fact that people fight less when it is raining, and/or given the agricultural calendar. – generic_user Feb 23 '18 at 16:04
• Also, what sort of trends does this package monitor for you? All of them? I'm sure that searches for bandages and CPR are more relevant than pr0n and lolcats. – generic_user Feb 23 '18 at 16:06
• @generic_user I'm not sure whether I understood your comment correctly; the package itself does not monitor trends - Google Trends is a tool that provides you with the (relative) amount of searches for certain terms or topics over time. I'll also consider your advice about seasonality, thank you! – SamVimes Feb 23 '18 at 16:26
• What I'm asking is what variables you're using to predict your time series, besides the time series itself. Or is this a purely autoregressive job? – generic_user Feb 23 '18 at 16:31
• Here is a fairly canonical paper using weather to relate economic shocks to civil conflict: emiguel.econ.berkeley.edu/research/… – generic_user Feb 23 '18 at 16:32

I took your 260 weekly values and introduced them to AUTOBOX in an automatic manner. To develop a model one needs to condition the equation based upon possible anomalies , level shifts , weekly indicators and of course possible ARIMA memory. The original series had an ACF of and the residuals from a useful model had an ACF here and the following residual plot .... both suggesting that a useful model may have been developed.

The Actual and Forecast graph is here ## ## with the Actual/Fit and Forecast here .

The equation is listed here with statistics here . The forecast going forward requires predictions of the google series .

In summary the google series is statistically significant and also certain weeks of the year are also suggested to be important reflecting an omitted causal variable.

Ordinary correlation has no play with data like this because there are outside/identifiable factors which need to be incorporated in order to correctly "see" the relationship (if any ! )

• Thank you for your work! I'm afraid this is not what I am looking for; I'm not able to use Autobox and due to my limited statistical knowledge I'd like to keep my model a bit simpler and try what I have described in my post. – SamVimes Feb 24 '18 at 11:44
• Simple is often "simply inappropriate" due to the nature/complications of the data being characterized/modeled. Models should be as simple as possible but not too simple. Glad to have been of help. – IrishStat Feb 24 '18 at 11:52
• Yes, I fully agree, but sadly I also have to consider practical limitations. Thank you nevertheless! – SamVimes Feb 24 '18 at 12:23