﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
424	Difference between noise in Estimate function and noise calculated with DifEq	César Pérez Álvarez	Víctor de Buen Remiro	"The follow code estimates the IPI series and shows that ""difference"" that is the difference between ""noise"" (the noise in Estimate) and ""NIpi"" (the noise calculated from residuals and using psi-weights) is not zero.
///////////////////////////////////////////////////////////////////////////////
Set Include(""ipi.bdt"");

Serie Tri1 = CalInd(M(1), Trimestral);
Serie Tri2 = CalInd(M(4), Trimestral)-Tri1;
Serie Tri3 = CalInd(M(7), Trimestral)-Tri1;
Serie Tri4 = CalInd(M(10), Trimestral)-Tri1;
Set InpIPI = SetOfSet(InputDef(0.1, Tri2),
                    InputDef(0.1, Tri3),
                    InputDef(0.1, Tri4));
                    
Serie IPITri = DatCh(IPI, Trimestral, SumS);

Set MDP = ModelDef(Log(IPITri), 1, 0, 4, 0, Polyn 1-B, 
                  [[ Polyn 1, Polyn 1 ]], [[ Polyn 1-0.1*B, Polyn 1 ]], 
                  InpIPI, Copy(Empty)); 
Set MEP = Estimate(MDP, First(IPITri), y2006);

Polyn ma   = BinGroup(""*"", MEP[2][8]);
Polyn ari  = (BinGroup(""*"", MEP[2][7])*MEP[2][6]);
Ration psi = ma/ari; 
Serie residuals =  MEP[3][1];
Serie noise =  MEP[3][3];
Serie NIpi  = DifEq(psi, residuals,SubSer(noise, y1992m04d01, y1992m04d01));
Serie NIpi2 = DifEq(psi, residuals,noise);
Serie difference = noise-NIpi;
///////////////////////////////////////////////////////////////////////////////
The ipi.bdt file:
///////////////////////////////////////////////////////////////////////////////

Mensual;IPI; 
1992/01/01;81.2; 
1992/02/01;82.5; 
1992/03/01;83.7; 
1992/04/01;81.2; 
1992/05/01;84; 
1992/06/01;82.9; 
1992/07/01;83.2; 
1992/08/01;48.3; 
1992/09/01;79.7; 
1992/10/01;82.7; 
1992/11/01;78.9; 
1992/12/01;69.4; 
1993/01/01;74.4; 
1993/02/01;73.6; 
1993/03/01;77.3; 
1993/04/01;72.8; 
1993/05/01;79.7; 
1993/06/01;78; 
1993/07/01;79.3; 
1993/08/01;45.9; 
1993/09/01;78; 
1993/10/01;81.3; 
1993/11/01;80.6; 
1993/12/01;72.8; 
1994/01/01;75.3; 
1994/02/01;77.7; 
1994/03/01;83.3; 
1994/04/01;78.7; 
1994/05/01;82.9; 
1994/06/01;85; 
1994/07/01;86; 
1994/08/01;51.7; 
1994/09/01;84.1; 
1994/10/01;87.4; 
1994/11/01;88.3; 
1994/12/01;81.9; 
1995/01/01;84.7; 
1995/02/01;82.9; 
1995/03/01;88.9; 
1995/04/01;83.7; 
1995/05/01;90; 
1995/06/01;90.3; 
1995/07/01;88.8; 
1995/08/01;54.2; 
1995/09/01;86.9; 
1995/10/01;88.8; 
1995/11/01;89.3; 
1995/12/01;80.6; 
1996/01/01;81.4; 
1996/02/01;81.9; 
1996/03/01;86.9; 
1996/04/01;81.1; 
1996/05/01;87.2; 
1996/06/01;89.2; 
1996/07/01;88.3; 
1996/08/01;54.6; 
1996/09/01;86.1; 
1996/10/01;90.5; 
1996/11/01;89.7; 
1996/12/01;78.9; 
1997/01/01;85.6; 
1997/02/01;83.3; 
1997/03/01;94.3; 
1997/04/01;87.4; 
1997/05/01;91.5; 
1997/06/01;94.1; 
1997/07/01;95.9; 
1997/08/01;60.2; 
1997/09/01;93.3; 
1997/10/01;98.8; 
1997/11/01;95.4; 
1997/12/01;85.1; 
1998/01/01;91.4; 
1998/02/01;93.1; 
1998/03/01;97.2; 
1998/04/01;92.9; 
1998/05/01;98.3; 
1998/06/01;99.7; 
1998/07/01;100.7; 
1998/08/01;62.9; 
1998/09/01;96.7; 
1998/10/01;101.6; 
1998/11/01;99.4; 
1998/12/01;89.3; 
1999/01/01;95.3; 
1999/02/01;92.9; 
1999/03/01;98.6; 
1999/04/01;93.6; 
1999/05/01;99.4; 
1999/06/01;101.6; 
1999/07/01;104.4; 
1999/08/01;65.6; 
1999/09/01;100.2; 
1999/10/01;103.3; 
1999/11/01;103.9; 
1999/12/01;93.4; 
2000/01/01;98; 
2000/02/01;100.2; 
2000/03/01;105.9; 
2000/04/01;98.4; 
2000/05/01;107; 
2000/06/01;106.4; 
2000/07/01;107.2; 
2000/08/01;70; 
2000/09/01;103; 
2000/10/01;104.2; 
2000/11/01;107.9; 
2000/12/01;95.2; 
2001/01/01;98.4; 
2001/02/01;98.8; 
2001/03/01;104.4; 
2001/04/01;96.3; 
2001/05/01;106.1; 
2001/06/01;105.9; 
2001/07/01;104.3; 
2001/08/01;72.2; 
2001/09/01;101.9; 
2001/10/01;105.1; 
2001/11/01;102.7; 
2001/12/01;89.1; 
2002/01/01;97; 
2002/02/01;97.9; 
2002/03/01;103.5; 
2002/04/01;97.8; 
2002/05/01;104; 
2002/06/01;103.1; 
2002/07/01;106.1; 
2002/08/01;71.2; 
2002/09/01;102.3; 
2002/10/01;108.2; 
2002/11/01;105.2; 
2002/12/01;90.9; 
2003/01/01;98.2; 
2003/02/01;99.6; 
2003/03/01;105.1; 
2003/04/01;100.2; 
2003/05/01;104.5; 
2003/06/01;105.4; 
2003/07/01;108.1; 
2003/08/01;71.7; 
2003/09/01;102.7; 
2003/10/01;109.4; 
2003/11/01;106.6; 
2003/12/01;92.1; 
2004/01/01;97.5; 
2004/02/01;101.2; 
2004/03/01;108.6; 
2004/04/01;101; 
2004/05/01;107.4; 
2004/06/01;109.1; 
2004/07/01;109.9; 
2004/08/01;72.8; 
2004/09/01;106; 
2004/10/01;107.7; 
2004/11/01;108.9; 
2004/12/01;92.8; 
2005/01/01;98.3; 
2005/02/01;100.4; 
2005/03/01;109.5; 
2005/04/01;101.3; 
2005/05/01;107.5; 
2005/06/01;109; 
2005/07/01;109.3; 
2005/08/01;75.1; 
2005/09/01;106.2; 
2005/10/01;107.6; 
2005/11/01;109.9; 
2005/12/01;97; 
2006/01/01;101.7; 
2006/02/01;103.1; 
2006/03/01;111.4; 
2006/04/01;102.5; 


It is possible that we have a wrong re-calculate of the residuals in last step of the estimation? I observed that this behaviour it's not always the same. In other cases Estimate works well."	defect	closed	highest		Math	head	blocker	fixed		
