Hi all,

I am trying to replicate the results of the paper " A Small Open Economy DSGE Model for Pakistan " by ADNAN HAIDER AND SAFDAR ULLAH KHAN (2008) ,I have written the codes for this paper which are attached below. However, when I run it I get the following errors:

*Error using print_info (line 54)

One of the eigenvalues is close to 0/0 (the absolute value of numerator and

denominator is smaller than 1e-06!

If you believe that the model has a unique solution you can try to reduce

the value of qz_zero_threshold.

Error in check (line 76)

print_info(info, 0, options);

Error in dsgeforpak (line 248)

oo_.dr.eigval = check(M_,options_,oo_);

Error in dynare (line 180)

evalin(‘base’,fname) ;

*

I also attach the paper,I would appreciate any help on this matter

Thanks

dsgeforpak.mod (1.82 KB)

a small open dsge model for pakistan.pdf (606 KB)

model_diagnostics says:

[quote]MODEL_DIAGNOSTICS: The Jacobian of the static model is singular

MODEL_DIAGNOSTICS: there is 1 colinear relationships between the variables and the equations

Colinear variables:

rstar

pistar

Colinear equations

4 6 12

MODEL_DIAGNOSTICS: The presence of a singularity problem typically indicates that there is one

MODEL_DIAGNOSTICS: redundant equation entered in the model block, while another non-redundant equation

MODEL_DIAGNOSTICS: is missing. The problem often derives from Walras Law.[/quote]

Looking at the appendix of the paper, there is a timing issue in equations 7 and 12 of Table B2. You need to fix that. Currently, it seems that only the foreign real return is determined, but not the individual components.

Thanks Mr. Pfeifer.I fixed the timing issue,(change line 61 `rstar-pistar(+1)=rhor*(rstar(-1)-pistar)+epsilonrs;`

to `rstar-pistar(+1)=rhor*(rstar-pistar)+epsilonrs;`

,but the following message pops up:

EIGENVALUES:

Modulus Real Imaginary

```
0 -0 0
8.814e-18 8.814e-18 0
0.3978 0.2736 0.2888
0.3978 0.2736 -0.2888
0.4284 0.4284 0
0.5 0.5 0
0.5 0.5 0
0.5 0.5 0
0.5255 0.3888 0.3535
0.5255 0.3888 -0.3535
1.252 1.252 0
2.972 2.972 0
4.063 4.063 0
Inf -Inf 0
Inf -Inf 0
```

There are 5 eigenvalue(s) larger than 1 in modulus

for 6 forward-looking variable(s)

The rank condition ISN’T verified!

Error using print_info (line 45)

Blanchard Kahn conditions are not satisfied: indeterminacy

Error in stoch_simul (line 98)

print_info(info, options_.noprint, options_);

Error in dsgeforpak (line 256)

info = stoch_simul(var_list_);

Error in dynare (line 180)

evalin(‘base’,fname) ;

You most probably did not correct the timing as there still is a problem with the BK conditions. You just tweaked it so that another error arises. There is only one economically correct timing and you need to find it.