Novice Question: Where do the constants come from?

#1
Hello,

I have come across this in a book and I have a question about how to recreate this. When trying to calculate the residuals in a autoregression model, where do these constants (A,B) come from?

1.jpg

Thank you
Matt
 
#3
I am not sure what an autoregressive model is. Is this ARMA, regression with ARMA error, ARIMA?

I would think if you are running this in R or SAS it would generate these for you.
 

Dason

Ambassador to the humans
#4
The question specifically states AR(1). You know that AR stands for auto-regressive right? And that ARIMA is really AR-I-MA for auto-regressive integrated moving average which just combines AR and MA models and allows for differencing directly in the model (the I component).
 
#5
The question specifically states AR(1). You know that AR stands for auto-regressive right? And that ARIMA is really AR-I-MA for auto-regressive integrated moving average which just combines AR and MA models and allows for differencing directly in the model (the I component).
yeah I know that dason. I do time series for a living, I know what AR(1) is. :( I am not certain what disagreement you have with my answer. I was pointing out that for some software and some methods the software may calculate the residuals for you and the intercept as well. So you don't have to do that by hand. A here is the constant, B the slope as in any regression model. Generally in time series the error term has to be adjusted for AR error (or in some models for MA error as well) and stationarity is required. That is the normal assumptions, before the transformations, about the error term are not accurate.
 
#6
Thanks for all the replies.

They're typically estimated from the data
How would one go about estimating them if the time series is an exchange rate?

I would think if you are running this in R or SAS it would generate these for you.
I am running this with Python but when I run the residual code, it comes back with NaNs and I'm not sure why. Perhaps if I understood the statistics better I would understand why.

Matt
 
#9
Can the same result be accomplished by having the independent variable be my times series shifted back 1 and conduct regular regression with ordinary least squares and then find the residuals for this?
 
#10
You can calculate residuals that have auto regression in them. Residuals are simply the difference between what you predict with the model and the observed results. There is no way that having autoregression could make it impossible to generate residuals, residuals are how you test for errors in the assumptions usually (specialized tests using lags is how you test for autoregression, some tests are better than others). You might look up the use of HAC to deal with autoregression (or the use of ARMA or ARIMA models).
 
#11
You can calculate residuals that have auto regression in them. Residuals are simply the difference between what you predict with the model and the observed results. There is no way that having autoregression could make it impossible to generate residuals, residuals are how you test for errors in the assumptions usually (specialized tests using lags is how you test for autoregression, some tests are better than others). You might look up the use of HAC to deal with autoregression (or the use of ARMA or ARIMA models).