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)
My question is: how do I incorporate one autoregressive term and a moving average of one into my regression?