v4 tests: t_normcdf test also when there is a lag in an argument
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1462 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
f60bb42588
commit
a6cd92f574
|
@ -4,7 +4,7 @@ model;
|
|||
x1 = 1.96;
|
||||
x2 = 1;
|
||||
x3 = 0.5;
|
||||
y1 = normcdf(x1,0,1);
|
||||
y1 = normcdf(x1(-1),0,1);
|
||||
y2 = normcdf(-x1,-x2,1);
|
||||
y3 = normcdf(x1/2,0,x3);
|
||||
end;
|
||||
|
@ -30,21 +30,22 @@ if abs(oo_.steady_state(3) - pnorm(1.96/2,0,1/2)) > 1e-12;
|
|||
error('Error 3 in t_normcdf')
|
||||
end;
|
||||
|
||||
[junk,JJ] = t_normcdf_dynamic(oo_.steady_state,[]);
|
||||
z = [oo_.steady_state(4); oo_.steady_state];
|
||||
[junk,JJ] = t_normcdf_dynamic(z,[]);
|
||||
|
||||
if abs(JJ(4,4) + dnorm(1.96,0,1)) > 1e-12;
|
||||
if abs(JJ(4,1) + dnorm(1.96,0,1)) > 1e-12;
|
||||
error('Error 4 in t_normcdf')
|
||||
end;
|
||||
if abs(JJ(5,4) - dnorm(-1.96,-1,1)) > 1e-12;
|
||||
if abs(JJ(5,5) - dnorm(-1.96,-1,1)) > 1e-12;
|
||||
error('Error 5 in t_normcdf')
|
||||
end;
|
||||
if abs(JJ(5,5) + dnorm(-1.96,-1,1)) > 1e-12;
|
||||
if abs(JJ(5,6) + dnorm(-1.96,-1,1)) > 1e-12;
|
||||
error('Error 6 in t_normcdf')
|
||||
end;
|
||||
if abs(JJ(6,4) + dnorm(1.96/2,0,1/2)/2) > 1e-12;
|
||||
if abs(JJ(6,5) + dnorm(1.96/2,0,1/2)/2) > 1e-12;
|
||||
error('Error 7 in t_normcdf')
|
||||
end;
|
||||
if abs(JJ(6,6) - (1/2)*((1.96/2)/(1/2)^2)*dnorm(1.96/2,0,1/2)) > 1e-12;
|
||||
if abs(JJ(6,7) - (1/2)*((1.96/2)/(1/2)^2)*dnorm(1.96/2,0,1/2)) > 1e-12;
|
||||
error('Error 8 in t_normcdf')
|
||||
end;
|
||||
|
||||
|
|
Loading…
Reference in New Issue