Re: [Gretl-users] Some questions about X-12-ARIMA
by Allin Cottrell

On Mon, 10 Jan 2011, [big5] ������ ������ wrote:
> In a word, why are the most outcomes of seasonal ARIMA and
> X-12-ARIMA almost the same(ex:ARIMA(1,1,1)(1,1,0) and
> X-12-ARIMA(1,1,1)(1,1,0), ARIMA(2,1,1)(0,1,2) and
> X-12-ARIMA(2,1,1)(0,1,2)). Their general equations are
> different. Shouldn't their outcomes be different?
What makes you think the results should be different? In your
examples you are estimating the same seasonal ARIMA model using
the same method (conditional ML) (a) via gretl itself and (b) via
X-12-ARIMA.
There are differences between native-gretl and X-12-ARIMA
(explained in section 22.2 of the Gretl User's Guide) but if the
model does not contain a constant or any exogenous variables these
differences will not be apparent. (Of course, differences may
emerge if the likelihood-maximization is particularly difficult
and one or other of the programs fails to find the maximum.)
Allin Cottrell
12 years, 4 months

Some questions about X-12-ARIMA
by 不提供 不提供

Dear all:
When I choose the options of Model/Time series/ARIMA/Using X-12-ARIMA to gain a model,
are the explanatory variables such as as number of working days,day of week effects, length of month etc included automatically already in the model ?
Is the model I get a RegARIMA model?
If it is not, how do I input the variables above in gretl 1.9.1 cvs ?
>From where I can choose these variables and show their output in gretl 1.9.1 cvs ?
Thanhs a lot
12 years, 4 months

Some questions about X-12-ARIMA
by 不提供 不提供

Dear all:
John C. Frain, thank you.
So if I choose the options Model/Time series/ARIMA/Using X-12-ARIMA to run the X-12-ARIMA model. The explanatory variables such as as number of working days,
day of week effects, length of month etc are all automatically already included, they are just not shown in the output of gretl, right? Or I have to choose these variables by myself?
Are all the explanatory variables the same as RegARIMA in X-12-ARIMA – Reference Manual, Version 0.3. (U.S. Census Bureau) ?
Thanks a lot
12 years, 4 months

Some questions about X-12-ARIMA
by 不提供 不提供

Thanks John C. Frain & Dr RJF Hudson. It is kind of you to answer my question. But there are still some questions.
The equations of seasonal ARIMA and X-12-ARIMA are different, so their outcomes should be different.
But I get almost the same outcomes when I run seasonal ARIMA and X-12-ARIMA using the same AR and MA.(ex: ARIMA(1,1,1)(1,1,0) and X-12-ARIMA(1,1,1)(1,1,0))
There are a few excepios. The outcomes of ARIMA(1,1,1)(1,1,0) and X-12-ARIMA(1,1,1)(1,1,0) above may be almost the same.
But when I run ARIMA(1,1,2)(2,1,0) and X-12-ARIMA(1,1,2)(2,1,0) under the same sample.
Their outcomes are hugely different. Most of them are almost the same. A few exceptions of them are different.
In a word, why are the most outcomes of seasonal ARIMA and X-12-ARIMA almost the same(ex:ARIMA(1,1,1)(1,1,0) and X-12-ARIMA(1,1,1)(1,1,0), ARIMA(2,1,1)(0,1,2) and X-12-ARIMA(2,1,1)(0,1,2)).
Their general equations are different. Shouldn't their outcomes be different? I don't know it is a question about statistics, or I run X-12-ARIMA incorrectly in gretl.
If I choose the options of Model/Time series/ARIMA/Using X-12-ARIMA to run the X-12-ARIMA model, it has already included original seasonality adjusting variables of regARIMA or I have to choose these variables by myself?(I just want to include the variables defined by X-12-ARIMA – Reference Manual, Version 0.3. U.S. Census Bureau)
Thanks a lot
The examples are below:
ARIMA(1,1,1)(1,1,0)
Function evaluations: 22
Evaluations of gradient: 8
Model 5: ARIMA, using observations 1982:03-1989:12 (T = 94)
Estimated using BHHH method (conditional ML)
Dependent variable: (1-L)(1-Ls) z
coefficient std. error z p-value
---------------------------------------------------------
phi_1 0.0386387 0.490287 0.07881 0.9372
Phi_1 -0.547450 0.103980 -5.265 1.40e-07 ***
theta_1 0.134454 0.505469 0.2660 0.7902
Mean dependent var -595.9894 S.D. dependent var 35113.05
Mean of innovations -657.4065 S.D. of innovations 29171.20
Log-likelihood -1099.788 Akaike criterion 2207.577
Schwarz criterion 2217.750 Hannan-Quinn 2211.686
Real Imaginary Modulus Frequency
-----------------------------------------------------------
AR
Root 1 25.8808 0.0000 25.8808 0.0000
AR (seasonal)
Root 1 -1.8266 0.0000 1.8266 0.5000
MA
Root 1 -7.4375 0.0000 7.4375 0.5000
-----------------------------------------------------------
X-12-ARIMA(1,1,1)(1,1,0))
Model 6: ARIMA, using observations 1982:03-1989:12 (T = 94)
Estimated using X-12-ARIMA (conditional ML)
Dependent variable: (1-L)(1-Ls) z
coefficient std. error z p-value
---------------------------------------------------------
phi_1 0.0383739 0.602274 0.06371 0.9492
Phi_1 -0.547423 0.0911210 -6.008 1.88e-09 ***
theta_1 0.134554 0.597619 0.2252 0.8219
Mean dependent var -595.9894 S.D. dependent var 35113.05
Mean of innovations -657.4774 S.D. of innovations 29171.20
Log-likelihood -1099.788 Akaike criterion 2207.577
Schwarz criterion 2217.750 Hannan-Quinn 2211.686
Real Imaginary Modulus Frequency
-----------------------------------------------------------
AR
Root 1 26.0594 0.0000 26.0594 0.0000
AR (seasonal)
Root 1 -1.8267 0.0000 1.8267 0.5000
MA
Root 1 -7.4320 0.0000 7.4320 0.5000
-----------------------------------------------------------
ARIMA(1,1,2)(2,1,0)
Model 7: ARIMA, using observations 1983:03-1989:12 (T = 82)
Estimated using BHHH method (conditional ML)
Dependent variable: (1-L)(1-Ls) z
coefficient std. error z p-value
-------------------------------------------------------
phi_1 -0.590308 0.200862 -2.939 0.0033 ***
Phi_1 -0.683313 0.134247 -5.090 3.58e-07 ***
Phi_2 -0.240713 0.113586 -2.119 0.0341 **
theta_1 0.873512 0.207170 4.216 2.48e-05 ***
theta_2 0.361254 0.0966288 3.739 0.0002 ***
Mean dependent var -1074.305 S.D. dependent var 36698.54
Mean of innovations -1019.087 S.D. of innovations 28580.42
Log-likelihood -957.7121 Akaike criterion 1927.424
Schwarz criterion 1941.864 Hannan-Quinn 1933.222
Real Imaginary Modulus Frequency
-----------------------------------------------------------
AR
Root 1 -1.6940 0.0000 1.6940 0.5000
AR (seasonal)
Root 1 -1.4194 -1.4628 2.0382 -0.3726
Root 2 -1.4194 1.4628 2.0382 0.3726
MA
Root 1 -1.2090 -1.1430 1.6638 -0.3795
Root 2 -1.2090 1.1430 1.6638 0.3795
-----------------------------------------------------------
X-12-ARIMA(1,1,2)(2,1,0)
Model 8: ARIMA, using observations 1983:03-1989:12 (T = 82)
Estimated using X-12-ARIMA (conditional ML)
Dependent variable: (1-L)(1-Ls) z
coefficient std. error z p-value
-------------------------------------------------------
phi_1 0.653709 0.209156 3.125 0.0018 ***
Phi_1 -0.675406 0.113095 -5.972 2.34e-09 ***
Phi_2 -0.244173 0.113191 -2.157 0.0310 **
theta_1 -0.566737 0.220105 -2.575 0.0100 **
theta_2 -0.222901 0.115118 -1.936 0.0528 *
Mean dependent var -1074.305 S.D. dependent var 36698.54
Mean of innovations -2724.431 S.D. of innovations 29295.00
Log-likelihood -959.7371 Akaike criterion 1931.474
Schwarz criterion 1945.914 Hannan-Quinn 1937.272
Real Imaginary Modulus Frequency
-----------------------------------------------------------
AR
Root 1 1.5297 0.0000 1.5297 0.0000
AR (seasonal)
Root 1 -1.3830 1.4774 2.0237 0.3698
Root 2 -1.3830 -1.4774 2.0237 -0.3698
MA
Root 1 1.1990 0.0000 1.1990 0.0000
Root 2 -3.7416 0.0000 3.7416 0.5000
12 years, 4 months

Some questions about X-12-ARIMA
by 不提供 不提供

Dear all:
I make my question clearer. ARIMA and X-12-ARIMA have almost the same outcomes under most combinations of AR and MA. For example, Using the same sample, the output of ARIMA(1,1,1)(1,1,0 ):
Function evaluations: 22
Evaluations of gradient: 8
Model 5: ARIMA, using observations 1982:03-1989:12 (T = 94)
Estimated using BHHH method (conditional ML)
Dependent variable: (1-L)(1-Ls) z
coefficient std. error z p-value
---------------------------------------------------------
phi_1 0.0386387 0.490287 0.07881 0.9372
Phi_1 -0.547450 0.103980 -5.265 1.40e-07 ***
theta_1 0.134454 0.505469 0.2660 0.7902
Mean dependent var -595.9894 S.D. dependent var 35113.05
Mean of innovations -657.4065 S.D. of innovations 29171.20
Log-likelihood -1099.788 Akaike criterion 2207.577
Schwarz criterion 2217.750 Hannan-Quinn 2211.686
Real Imaginary Modulus Frequency
-----------------------------------------------------------
AR
Root 1 25.8808 0.0000 25.8808 0.0000
AR (seasonal)
Root 1 -1.8266 0.0000 1.8266 0.5000
MA
Root 1 -7.4375 0.0000 7.4375 0.5000
-----------------------------------------------------------
the output of X-12-ARIMA(1,1,1)(1,1,0 ):
Model 6: ARIMA, using observations 1982:03-1989:12 (T = 94)
Estimated using X-12-ARIMA (conditional ML)
Dependent variable: (1-L)(1-Ls) z
coefficient std. error z p-value
---------------------------------------------------------
phi_1 0.0383739 0.602274 0.06371 0.9492
Phi_1 -0.547423 0.0911210 -6.008 1.88e-09 ***
theta_1 0.134554 0.597619 0.2252 0.8219
Mean dependent var -595.9894 S.D. dependent var 35113.05
Mean of innovations -657.4774 S.D. of innovations 29171.20
Log-likelihood -1099.788 Akaike criterion 2207.577
Schwarz criterion 2217.750 Hannan-Quinn 2211.686
Real Imaginary Modulus Frequency
-----------------------------------------------------------
AR
Root 1 26.0594 0.0000 26.0594 0.0000
AR (seasonal)
Root 1 -1.8267 0.0000 1.8267 0.5000
MA
Root 1 -7.4320 0.0000 7.4320 0.5000
-----------------------------------------------------------
The outcomes of ARIMA(1,1,1)(1,1,0 ) and X-12-ARIMA(1,1,1)(1,1,0 ) are almost the same.
But there are a few exceptions. For example, under the same sample, the output of ARIMA(1,1,2)(2,1,0 ):
Model 7: ARIMA, using observations 1983:03-1989:12 (T = 82)
Estimated using BHHH method (conditional ML)
Dependent variable: (1-L)(1-Ls) z
coefficient std. error z p-value
-------------------------------------------------------
phi_1 -0.590308 0.200862 -2.939 0.0033 ***
Phi_1 -0.683313 0.134247 -5.090 3.58e-07 ***
Phi_2 -0.240713 0.113586 -2.119 0.0341 **
theta_1 0.873512 0.207170 4.216 2.48e-05 ***
theta_2 0.361254 0.0966288 3.739 0.0002 ***
Mean dependent var -1074.305 S.D. dependent var 36698.54
Mean of innovations -1019.087 S.D. of innovations 28580.42
Log-likelihood -957.7121 Akaike criterion 1927.424
Schwarz criterion 1941.864 Hannan-Quinn 1933.222
Real Imaginary Modulus Frequency
-----------------------------------------------------------
AR
Root 1 -1.6940 0.0000 1.6940 0.5000
AR (seasonal)
Root 1 -1.4194 -1.4628 2.0382 -0.3726
Root 2 -1.4194 1.4628 2.0382 0.3726
MA
Root 1 -1.2090 -1.1430 1.6638 -0.3795
Root 2 -1.2090 1.1430 1.6638 0.3795
-----------------------------------------------------------
the output of X-12-ARIMA(1,1,2)(2,1,0 ):
Model 8: ARIMA, using observations 1983:03-1989:12 (T = 82)
Estimated using X-12-ARIMA (conditional ML)
Dependent variable: (1-L)(1-Ls) z
coefficient std. error z p-value
-------------------------------------------------------
phi_1 0.653709 0.209156 3.125 0.0018 ***
Phi_1 -0.675406 0.113095 -5.972 2.34e-09 ***
Phi_2 -0.244173 0.113191 -2.157 0.0310 **
theta_1 -0.566737 0.220105 -2.575 0.0100 **
theta_2 -0.222901 0.115118 -1.936 0.0528 *
Mean dependent var -1074.305 S.D. dependent var 36698.54
Mean of innovations -2724.431 S.D. of innovations 29295.00
Log-likelihood -959.7371 Akaike criterion 1931.474
Schwarz criterion 1945.914 Hannan-Quinn 1937.272
Real Imaginary Modulus Frequency
-----------------------------------------------------------
AR
Root 1 1.5297 0.0000 1.5297 0.0000
AR (seasonal)
Root 1 -1.3830 1.4774 2.0237 0.3698
Root 2 -1.3830 -1.4774 2.0237 -0.3698
MA
Root 1 1.1990 0.0000 1.1990 0.0000
Root 2 -3.7416 0.0000 3.7416 0.5000
-----------------------------------------------------------
The outcomes of ARIMA(1,1,2)(2,1,0 ) and X-12-ARIMA(1,1,2)(2,1,0 ) are hugely different.
The question above puzzles me.
I also want to know When I choose the options Model/Time series/ARIMA/Using X-12-ARIMA to run the X-12-ARIMA model. Is the set of equation of X-12-ARIMA in gretl the same as RegARIMA(X-12-ARIMA – Reference Manual, Version 0.3. U.S. Census Bureau):
φ(B)Φ(B)▽^d ▽_s^D[y-Σβ_i x_it]= θ(B)Θ(B)a_t
I can not see the outcome of any seasonality adjusting regression variables(the part of y-Σβ_i x_it, such as length-of-month、Trend constant、Trading day、level shift at t_0 and so on).
Thanks a lot
12 years, 5 months

some questions about X-12-ARIMA
by 不提供 不提供

Dear all:
I have three questions.
1: Why is the outcome of X-12-ARIMA model almost the same as Seasonal ARIMA. For example, there are two models with the same lags of AR and MA, namely X-12-ARIMA(1,1,0)(1,1,1) and ARIMA(1,1,0)(1,1,1).
The coefficient of AR(1)、SAR(1)、SMA(1) of X-12-ARIMA(1,1,0)(1,1,1) is 0.853261、1.774953、0.114786.
The coefficient of AR(1)、SAR(1)、SMA(1) of Seasonal ARIMA(1,1,0)(1,1,1) is
0.853332、1.774762、0.114335
AIC of X-12-ARIMA(1,1,0)(1,1,1) is 2487.968
AIC of ARIMA(1,1,0)(1,1,1) is 2487.942
MAPE of out of sample of X-12-ARIMA(1,1,0)(1,1,1) is 4.7894
MAPE of out of sample of Seasonal ARIMA(1,1,0)(1,1,1) is 4.7326
This two models are almost the same. Other lags of AR and MA have the same situation. But there is a few exceptions. For example, X-12-ARIMA(1,1,2)(2,1,0) and Seasonal ARIMA(1,1,2)(2,1,0) may have different outcome.
2: I choose the options of Model/Time series/ARIMA/Using X-12-ARIMA to run the X-12-ARIMA model. Is the set of equation of X-12-ARIMA in gretl the same as general model of RegARIMA in X-12-ARIMA – Reference Manual, Version 0.3. (U.S. Census Bureau)?
I can not see the outcome of any seasonality adjusting regression variables(such as length-of-month、level shift and so on).
3. Is there any relationship between the option of Model/Time series/ARIMA/Include a constant and trend constant in regARIMA? Can I not choose the option of Model/Time series/ARIMA/Include a constant when runing X-12-ARIMA?
Thanks a lot
12 years, 5 months

The positive and negative signs of the coefficients of ARIMA
by 不提供 不提供

Dear all:
I have a question about positive and negative signs of the coefficients of ARIMA when it is expressed in the equation form. There is the output of ARIMA(1,1,1)(1,1,1) below:
Function evaluations: 132
Evaluations of gradient: 45
Model 1: ARIMA, using observations 1977:03-1986:12 (T = 118)
Estimated using BHHH method (conditional ML)
Dependent variable: (1-L)(1-Ls) y
coefficient std. error z p-value
---------------------------------------------------------
phi_1 0.0767983 1.75029 0.04388 0.9650
Phi_1 -0.133120 0.159001 -0.8372 0.4025
theta_1 -0.0385106 1.77542 -0.02169 0.9827
Theta_1 -0.662710 0.131924 -5.023 5.08e-07 ***
The equation should be written in
(1-0.0767983L)(1+0.133120L^12) ▽^1▽_12^1 y_t=(1+0.0385106L)(1+0.662710L^12)a_t
or
(1+0.0767983L)(1-0.133120L^12) ▽^1▽_12^1 y_t=(1-0.0385106L)(1-0.662710L^12)a_t
?
Maybe the two equations are both wrong. What is the correct equation?
I don’t know the correct positive and negative signs of the coefficients in the ARIMA equation.
Another sample is ARIMAX. I add two dummy variables: dm1 is for January, dm2 is for Febuary. There is the output of ARIMAX(1,1,1) below:
Function evaluations: 41
Evaluations of gradient: 14
Model 3: ARMAX, using observations 1975:03-1986:12 (T = 142)
Estimated using BHHH method (conditional ML)
Dependent variable: (1-L) y
coefficient std. error z p-value
--------------------------------------------------------------
phi_1 0.675418 0.0430006 15.71 1.35e-055 ***
theta_1 -0.999999 0.0168669 -59.29 0.0000 ***
dm1 -52980.0 14985.0 -3.536 0.0004 ***
dm2 60226.2 14925.8 4.035 5.46e-05 ***
The ARIMAX equation should be written in
(1-0.675418b) ▽▽^1 y_t=(1+0.999999b) a_t+52980dm1-60226.2dm2
、
(1+0.675418b) ▽▽^1 y_t=(1-0.999999b) a_t-52980dm1+60226.2dm2
or other forms?
Thanks a lot
12 years, 5 months

Re: [Gretl-users] Evaluating Forecasts
by Allin Cottrell

On Thu, 6 Jan 2011, Henrique Andrade wrote:
> Em 6 de janeiro de 2011 Henrique escreveu:
>
> I'm trying to evaluate my forecasts using "fcstats()", but the results are
> > not quite good. Could you please take a look at my script?
Thanks for the report. The fcstats function was broken by a typo
in a CVS commit of December 7 (that is, after the 1.9.3 release).
This is now fixed in CVS and snapshots.
Allin Cottrell
12 years, 5 months

Evaluating Forecasts
by Henrique Andrade

Dear Gretl Community,
I'm trying to evaluate my forecasts using "fcstats()", but the results are
not quite good. Could you please take a look at my script?
<script>
open australia.gdt
smpl ; 1989:4
Modelo <- ols E const PAU PUS --robust
fcast 1972:1 1991:1 E_hat
smpl full
matrix Avaliacao = fcstats(E, E_hat)
</script>
Is there anything wrong in it?
Best regards,
--
Henrique C. de Andrade
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge
12 years, 5 months