#224 closed defect (fixed)
error when estimating with a bad defined AR or MA set of Polyn
Reported by: | Jorge | Owned by: | Jorge |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Math | Version: | head |
Severity: | critical | Keywords: | |
Cc: |
Description
The following code will break down TOL!!!!
Set SimulateARIMA(TimeSet tms, Date from, Real size, Set input,
Real sig2, Real deg_dif, Polyn pol_ar, Polyn pol_ma)
{
Date to = Succ(from, tms, size-1);
Serie at = SubSer(Gaussian(0,sig2,tms), Succ(from,tms,-100), to);
Polyn pol_dif = If(deg_dif==0, 1, 1-Bdeg_dif);
Serie Nt = SubSer(DifEq(pol_ma/(pol_dif*pol_ar),at), from, to);
Set input_fil = EvalSet(input, Serie (Set inp) {Serie inp[1]:inp[2]});
Serie filter = BinGroup("+", input_fil);
Set ModelDef(filter+Nt, 1, 0, deg_dif, 0, pol_dif,
pol_ar, 1?,
1, pol_ma?,
input,
AllLinear)
};
Serie GenStep(TimeSet tms, Date from, Real size, Real point)
{
Date to = Succ(from,tms,size-1);
Serie SubSer(Step(Succ(from,tms,point-1),tms), from, to)
};
Set test_one(Real a)
{
Set inputs = [[InputDef(1.2, GenStep(Mensual, y2004, 600, 150)),
InputDef(-1.3, GenStep(Mensual, y2004, 600, 300))]];
Set mod = SimulateARIMA(Mensual, y2004, 600, inputs, 1.0, 0, 1-0.7*B,1);
};
Set est = test_one(1);
Change History (5)
comment:1 Changed 20 years ago by
Status: | new → assigned |
---|
comment:2 Changed 20 years ago by
Resolution: | → later |
---|---|
Status: | assigned → closed |
comment:4 Changed 19 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
now tol does not crash.
the bug was related to missing data at the beginning of the estimation
you can replace the code of test_one for the one below in order to compute the
correct initial date of estimation, see bug 81 for a related solution.
Set test_one(Real a)
{
Set inputs = [[InputDef(1.2, GenStep(Mensual, y2004, 600, 150)),
InputDef(-1.3, GenStep(Mensual, y2004, 600, 300))]];
Set mod = SimulateARIMA(Mensual, y2004, 600, inputs, 1.0, 0, 1-0.7*B,1);
Date BeginOfEstim =
{
Real ARDeg = Degree(SetProd(mod->AR));
Real OmegaDeg = SetMax(EvalSet(Traspose(Extract(mod->Input,1))[1],Degree));
Succ(First(mod->Output),Dating(mod->Output),ARDeg+OmegaDeg)
};
Set Estimate(mod, BeginOfEstim, Last(mod[1]))
};
comment:5 Changed 18 years ago by
bug_file_loc: | → http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000224 |
---|
will be considered LATER