Incorporating one autoregressive term and a moving average in a regression
r
Solution
I economics, we often don't try to do ARIMA modeling with panel data. Instead, we use (quasi-) difference-in-difference estimation. If you aren't worried about non-stationarity, which it sounds like you aren't, then this paper by Bertrand, Duflo, and Mullainathan, "How Much Should We Trust Differences-in-Differences Estimates?", compares different means of taking autocorrelation into account for panel data. They find that the block bootstrap and HAC standard errors tend to work well.
Problem
I am doing a fixed effects regression and am having a problem with autocorrelation, to deal with this I am doing ARIMA modeling using the forecast, lmtest, and plm packages. My data is general panel data, looks like this, I am trying to do some ARIMA modeling but am having a hard time incorporating autoregressive terms and moving averages into a fixed effects regression using the plm package. Here is my attempt. ``` world_hour_fix = plm(WBGDPhour ~ broadband + resourcerents + education, data = hourframe, model = "within") auto.arima(world_hour_fix$residuals) # Series: world_hour_fix$residuals # ARIMA(1,0,1) with zero mean # # Coefficients: # ar1 ma1 # 0.403 0.3135 # s.e. 0.138 0.1586 # # sigma^2 estimated as 0.4901: log likelihood=-175.54 # AIC=357.09 AICc=357.23 BIC=366.4 auto.arima(world_fix$residuals) ``` How do I incorporate one autoregressive term and a moving average of one into my regression?