1
$\begingroup$

I have a regression with ARMA errors, which I am fitting with arima(). I know that the ARMA model is being fit on these residuals from the regression. My problem is that when I use include.mean=TRUE the output does not return any estimate of the mean (of the residuals, which yes, I know is always zero). The documentation says that ARMA model will include a mean if this option is set to TRUE.

I do see an intercept reported, which is the intercept from the regression of y on x, not the intercept from the ARMA model on the residuals.

How do I get the include.mean argument to work? Is there any other way to get the intercept from the ARMA model on residuals? Is R just censoring this because residuals are always mean zero (if intercept is in regression)?

MWE is below, thanks in advance.

set.seed(123) y = as.xts(ts(rnorm(20)+3, start=c(1980,1), freq=12)) x = as.xts(ts(rnorm(20)+5, start=c(1980,1), freq=12))

fit1 = arima(y, xreg=as.data.frame(x), order=c(1,0,0), include.mean=TRUE) fit1 # intercept shown is from the regression, 3-(-.0935)*(5), not for the residual ARMA model

$\endgroup$
  • $\begingroup$ What do you want? A mean for the fitted values? mean(fitted(fit1)) Or a mean for the residuals? mean(residuals(fit1)) $\endgroup$ – ch-pub Aug 4 '14 at 22:20
  • $\begingroup$ I think you have answered your question. Don't know how you can estimate 2 intercepts (for xreg and for resid) simultaneously. Furthermore, what does it mean to have an intercept for resid? $\endgroup$ – qoheleth Aug 4 '14 at 23:42
  • $\begingroup$ @nsw, I would like the intercept parameter, or the mean, to be estimated in my ARMA models. $\endgroup$ – moof Aug 5 '14 at 2:31
  • $\begingroup$ @qoheleth, intercept for ARMA residuals model means the same as any intercept any other time. It should just have the value zero, doesn't mean there is anything different in estimating it. $\endgroup$ – moof Aug 5 '14 at 2:43
  • $\begingroup$ then what nsw suggested will do I suppose. mean(residuals(fit1)) $\endgroup$ – qoheleth Aug 5 '14 at 3:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.