#428 closed defect (fixed)
Serious problems with MA models
Reported by: | César Pérez Álvarez | Owned by: | Víctor de Buen Remiro |
---|---|---|---|
Priority: | highest | Milestone: | |
Component: | Math | Version: | head |
Severity: | blocker | Keywords: | |
Cc: |
Description
Hi!
If we try this model:
Serie g = SubSer(Gaussian(0, 1, Mensual), y1990m01d01, y2006m01d01);
Serie noise = DifEq(((1-0.8*B12)*(1-0.6*B))/((1-B)*(1-B12)), g);
Set MD = ModelDef(noise, 1, 0, 12, 0, (1-B)*(1-B12),
SetOfPolyn(1 , 1), SetOfPolyn(1-0.1*B, 1-0.1*B12), Copy(Empty), Copy(Empty));
Set ME = Estimate(MD, First(noise), Last(noise));
The estimated parameters are very different to real ones. The residuals series has enormous values at the beginning.
This behaviour occurs with this model too:
Serie g = SubSer(Gaussian(0, 1, Mensual), y1990m01d01, y2006m01d01);
Serie noise = DifEq(((1-0.6*B)*(1-0.3*B))/(1-B), g);
Set MD = ModelDef(noise, 1, 0, 1, 0, (1-B),
SetOfPolyn(1 , 1), SetOfPolyn(1-0.1*B-0.1*B2, 1), Copy(Empty), Copy(Empty));
Set ME = Estimate(MD, First(noise), Last(noise));
However if we estimate this model:
Serie g = SubSer(Gaussian(0, 1, Mensual), y1990m01d01, y2006m01d01);
Serie noise = DifEq((1-0.6*B)/(1-B), g);
Set MD = ModelDef(noise, 1, 0, 1, 0, (1-B),
SetOfPolyn(1 , 1), SetOfPolyn(1-0.1*B, 1), Copy(Empty), Copy(Empty));
Set ME = Estimate(MD, First(noise), Last(noise));
The estimated parameter does not move and stays in 0.1.
Change History (3)
comment:1 Changed 19 years ago by
comment:2 Changed 19 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Problem has been fixed in CVS
Congratulations: your isolation of the bug has been really great and it has helped much to find the cause and to fix this old problem with multiple pure MA models at autocovarianze matrix calculation. In mathematical terms, is something as simple as the polynomial product MA(B)*MA(F). However in informatical terms is really more complicated to do it in an efficient way and last term of MA(B)*M(F) was lost due to a wrong indexes management, because polynomial degree and size were confused by me. So, non factored full MA polynomials were working fine.
On the other hand, although is not the problem here it could be in other circumstances with other ARMA structures, you are not simulating a true ARIMA process, due to you are using zeroes as initial values of noise that is not statistically correct. To simulate it you can include a large past for differential equation to force process convergence in this very easy approximated way:
Serie g0 = SubSer(Gaussian(0, 1, Mensual), y1900m01d01, y2006m01d01);
Serie z0 = DifEq(MA/(AR*DIF), g0);
Serie g = SubSer(g0, y1990m01d01, Last(g0));
Serie z = SubSer(z0, y1990m01d01, Last(z0));
Note that the closer to unit circle were the ARMA roots the larger convergence period will be needed.
Thanks to report it.
comment:3 Changed 18 years ago by
bug_file_loc: | → http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000428 |
---|
I missed the variables that I used in Estimate