0
$\begingroup$

I have a times series dataset that combines trends on twitter with discrete occurrences of violence. The dataset goes from 1/1/2015-10/30/2016 and each observation is a date. For each data there is a variable that shows the percentage of tweets that day that were negative and positive and there is another variable that is a 1-0 dummy variable for if an attack occurred.

I want to estimate the effect of an attack on how negative twitter was the day of the attack and the day following. So far I have estimated:

perneg= b(0) + b(1)*attack + b(2)*Date + epsilon in a standard OLS regression, to measure how the occurrence of an attack causes perneg to increase. Sometimes I use lagged attack values. However, I can't help but feel that this isn't quite correct. Is there a better/more robust approach to estimate the value that I want?

Also there are some missing values or 0s or 1s for the percent negative variable since some days did not have any tweets. Due to the relatively small number of tweets for any given day would it make more sense to aggregate this up to week-level as opposed to day-level observations?

I've included a screenshot of my data

$\endgroup$
0
$\begingroup$

As much as I like daily data when the variable of response is small as in this case I agree that weekly totals be used. Secondly I would use the actual number of tweets as the response variable and use the total number of tweets as a possible predictor. Why don't you post (fully) the data in this manner.

$\endgroup$
  • 1
    $\begingroup$ Could you justify your recommendations? Because the OP wishes to understand responses occurring within one day, it is difficult to see how using weekly totals could be useful. Even if you are recommending a rolling one-week window, that would simply obscure the basic daily nature of both the data and the problem. $\endgroup$ – whuber Nov 23 '16 at 23:26
  • 1
    $\begingroup$ oops . missed his objective ..the data is so sparse that it may not be possible to get a daily effect. $\endgroup$ – IrishStat Nov 24 '16 at 3:12

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.