Simulate from an ARIMA Model with constant in differenced-form
Simulate from an ARIMA Model with constant in differenced-form
Hi Tom,
How do I simulate from the following ARIMA + constant models, d=1 (in differenced-form), in RATS?
(i) ARIMA(1,1,0) + c
(ii) ARIMA(0,1,1) + c
(iii) ARIMA(1,1,1) + c
Regards
Amarjit
How do I simulate from the following ARIMA + constant models, d=1 (in differenced-form), in RATS?
(i) ARIMA(1,1,0) + c
(ii) ARIMA(0,1,1) + c
(iii) ARIMA(1,1,1) + c
Regards
Amarjit
Re: Simulate from an ARIMA Model with constant in differenced-form
I'm not sure what you mean by +C. From your description it sounds like you simulate the ARIMA process, then add C to the result.
Simulating an ARIMA process itself is relatively straightforward---put in the model with EQUATION and do a SIMULATE putting zeros in for the pre-sample values. Just create an extra 50 or so data points for a burn-in and extract the information after that.
Simulating an ARIMA process itself is relatively straightforward---put in the model with EQUATION and do a SIMULATE putting zeros in for the pre-sample values. Just create an extra 50 or so data points for a burn-in and extract the information after that.
Re: Simulate from an ARIMA Model with constant in differenced-form
TomDoan wrote: ↑Mon Aug 26, 2024 7:39 am I'm not sure what you mean by +C. From your description it sounds like you simulate the ARIMA process, then add C to the result.
Simulating an ARIMA process itself is relatively straightforward---put in the model with EQUATION and do a SIMULATE putting zeros in for the pre-sample values. Just create an extra 50 or so data points for a burn-in and extract the information after that.
I can follow the examples viewtopic.php?t=3090, but they are for d=0, and not including a constant.
The question is how to model those 3 ARIMA models including a constant (constant as in the output from BOXJENK), but in differenced form: d=1.
(i) ARIMA(1,1,0) including a constant
(ii) ARIMA(0,1,1) including a constant
(iii) ARIMA(1,1,1) including a constant
Re: Simulate from an ARIMA Model with constant in differenced-form
You can do the whole thing in one go by inputting an equation which incorporates the differencing into the AR:
However, you can take a simulation without the differencing and just do an ACCUMULATE instruction to integrate it up. And the constant just requires adding the constant to the simulation of the AR or MA:
Code: Select all
equation(ar=1,ma=1,const,variance=1.0) yeq y
set y 1 500 = 0.0
set u 1 500 = 0.0
*
* Coefficients are in order:
* constant
* AR(1) (here 1.0 to make this an ARIMA(0,1,1)
* MA(1)
*
associate(resids=u) yeq
# 0.3 1.0 0.4
uforecast(simulate,equation=yeq) y 2 150
graph
# y 51 150
Code: Select all
set u 1 nburn+nobs = %ran(sigma)
set ma 1 nburn+nobs = C+u+theta*u{1}
set(first=0.0) ar 1 nburn+nobs = C+rho*ar{1}+u
acc ma / arima011
aaa ar / arima110
Re: Simulate from an ARIMA Model with constant in differenced-form
In BOXJENK Output there is a CONSTANT which is the mean (mu) of the model or E(y(t)). Shouldn't BOXJENK CONSTANT be relabeled MEAN instead?
Using RATS ExampleThree.xls data, estimating an AR(1) model, comparing LINREG with BOXJENK the CONSTANT's are different and the mean's are the same.
How is Linear Regression - Estimation by Least Squares, different to Box-Jenkins - Estimation by LS Gauss-Newton?
Further, if I simulate in-levels an ARMA model as e.g. y = 3.0 + 0.7*y(t-1) + 0.6*y(t-2) + e(t), the mu = (c1/(1.0 - phi1)) which is shown as a CONSTANT in BOXJENK, yet I cannot use BOXJENK output results for a forecast by-hand. To convert BOXJENK CONSTANT to be used for forecasting I would c1 = mu*(1.0 - phi1). Why does BOXJENK not display the constant (maybe as-well) which is used for forecasting, the mean is not?
If I integrate-up y(t) using the levels simulation series and estimate using BOXJENK with diff=1 I get the same results.
But how do I write the model? Is it
ARIMA(1,1,1)\\y(t) = 3.0 + 0.7*y(t-1) + e(t) + 0.6*e(t-1)
Or
ARIMA(1,0,1)\\d(y(t)) = 3.0 + 0.7*d(y(t-1)) + e(t) + 0.6*e(t-1)
Using RATS ExampleThree.xls data, estimating an AR(1) model, comparing LINREG with BOXJENK the CONSTANT's are different and the mean's are the same.
Code: Select all
linreg rate 1959:02 1996:02
# constant rate{1}
comp mu = %beta(1)/(1-%beta(2))
disp mu
boxjenk(constant,ar=||1||,NOMAXL) rate 1959:02 1996:02Further, if I simulate in-levels an ARMA model as e.g. y = 3.0 + 0.7*y(t-1) + 0.6*y(t-2) + e(t), the mu = (c1/(1.0 - phi1)) which is shown as a CONSTANT in BOXJENK, yet I cannot use BOXJENK output results for a forecast by-hand. To convert BOXJENK CONSTANT to be used for forecasting I would c1 = mu*(1.0 - phi1). Why does BOXJENK not display the constant (maybe as-well) which is used for forecasting, the mean is not?
If I integrate-up y(t) using the levels simulation series and estimate using BOXJENK with diff=1 I get the same results.
But how do I write the model? Is it
ARIMA(1,1,1)\\y(t) = 3.0 + 0.7*y(t-1) + e(t) + 0.6*e(t-1)
Or
ARIMA(1,0,1)\\d(y(t)) = 3.0 + 0.7*d(y(t-1)) + e(t) + 0.6*e(t-1)
Code: Select all
*===============================
* y = c1 + phi1*y(t-1) + e(t) + theta1*e(t-1)
seed 123
compute sigma=1.0
compute nburn=100
compute nobs=200
set e 1 nburn+nobs = %ran(sigma)
compute c1 = +3.0
compute phi1 = +0.7
compute theta1 = +0.6
compute mean1 = (c1/(1.0 - phi1))
disp 'mean' mean1
set(first=0.0) y 1 nburn+nobs = c1 + phi1*y{1} + e + theta1*e{1}
spgraph(vfields=1,hfields=2,footer="")
graph(head="ARMA(1,1)\\y(t) = 3.0 + 0.7*y(t-1) + e(t) + 0.6*e(t-1)") 1
# y nburn+1 nburn+nobs
@bjident(method=yule,diffs=0,report,number=15) y nburn+1 nburn+nobs
spgraph(done)
boxjenk(constant,ar=||1||,diff=0,ma=||1||,MAXL) y nburn+1 nburn+nobs
* integrate-up
acc Y / arima111
spgraph(vfields=2,hfields=2,footer="")
graph(head="ARIMA(1,1,1)\\y(t) = 3.0 + 0.7*y(t-1) + e(t) + 0.6*e(t-1)") 1
# arima111 nburn+1 nburn+nobs
@bjident(method=yule,diffs=1,report,number=15) arima111 nburn+1 nburn+nobs
spgraph(done)
boxjenk(const,diff=1,ar=||1||,ma=||1||,MAXL) arima111 nburn+1 nburn+nobs
Re: Simulate from an ARIMA Model with constant in differenced-form
No. Because (a) the process may have no mean (if it's integrated) and (b) if there are any other shift variables, it's not the mean anyway.
Because the Box-Jenkins model is a structural model, while the LINREG is the equivalent reduced form model. The estimated coefficients have different meanings.ac_1 wrote: ↑Mon Nov 18, 2024 5:13 am Using RATS ExampleThree.xls data, estimating an AR(1) model, comparing LINREG with BOXJENK the CONSTANT's are different and the mean's are the same.
How is Linear Regression - Estimation by Least Squares, different to Box-Jenkins - Estimation by LS Gauss-Newton?Code: Select all
linreg rate 1959:02 1996:02 # constant rate{1} comp mu = %beta(1)/(1-%beta(2)) disp mu boxjenk(constant,ar=||1||,NOMAXL) rate 1959:02 1996:02
From the User's Guide: "The advantages of the form chosen by RATS is that the estimated coefficient on the constant has a simple interpretation as the mean of the differenced process. It also generalizes better to intervention models and the like."
The description of BOXJENK explains how DEFINE transforms the structural ARIMA model into something usable for forecasting. Note, for instance, that the output from BOXJENK describes the AR terms as AR{1}, AR{2},... NOT as Y{1} and Y{2},... since they aren't.
The rest of your question seems to be a repetition of the confusion between the two.