Problem with rank condition in estimation

Dear forum members,
I am a new user trying to estimate the model used in Berg et al. (2010) “Short-run macroeconomics of aid”. I was confronted with a “rank condition violation” and could therefore not proceed forward with estimation. I have read some of the posts/advice from Dr Pfeifer on the need to check the timing of endogenous variables, which I did but could not figure out the problem. My mod and data files are attached. I would be grateful for your helps. Best regards. Sid.model2Q.mod (5.9 KB)

varmodel1.xlsx (23.1 KB)

It’s hard to tell. I can only give the generic advice to check all equations again and if that does not work, to start with a simpler version of the model that works.

Sidenote: your data looks very strange with the large spikes in pi.

Dear Dr Pfeifer, many thanks for the advice. Will double check. Best.

Dear Dr Pfeifer,
Following your advice I have simplified the model and it is now somehow running with the following error:
" Error using dseries/extract (line 61)
dseries::extract: Variable r is not a member of A!

Error in dseries/subsref (line 236)
B = extract(A,S(1).subs{:});

Error in makedataset (line 141)
DynareDataset = DynareDataset{DynareOptions.varobs{:}};

Error in dynare_estimation_init (line 538)
[dataset_, dataset_info, newdatainterfaceflag] = makedataset(options_,
options_.dsge_var*options_.dsge_varlag, gsa_flag);

Error in dynare_estimation_1 (line 116)
dynare_estimation_init(var_list_, dname, [], M_, options_, oo_, estim_params_,
bayestopt_);

Error in dynare_estimation (line 105)
dynare_estimation_1(var_list,dname);

Error in model3Q (line 327)
oo_recursive_=dynare_estimation(var_list_);

Error in dynare (line 235)
evalin(‘base’,fname) ;"

  1. Can you please help me figure out what is wrong.
  2. Is it a common practice to use “inv_gamma_pdf” functions for shocks?
  3. To your previous point on spikes in the pi (inflation rate) I have checked to ensure that the series are stationary.model3Q.mod (5.0 KB)

Thanks again for your support. The mod and data files are attached.varmodel.xlsx (35.4 KB)

Have you tried setting csigma2 = 0 in your government bonds outstanding equation? It seems your model is linear, but I think there will be a non-zero residual here.

I’m not very familiar with international models, and I know there are typically necessary tricks to impose on the equations related to bonds in order to get these models to run, so sorry if I am bringing unnecessary attention to one of these tricks.

In any case, maybe insert the “model_diagnostics” command and re-run the model and see if there are any other problems dynare can think of?

  1. Your model is linear, so all initial values should be 0. This results in a correct steady state. The one you had was weird.
  2. The last error comes from r being in column E in Excel, but your xls_range only going to D
  3. I am not doubting that pi is stationary, but values of 400 are nevertheless extremely strange. What is the interpretation here?
  4. Yes, it is common for shocks to be gamma or inverse gamma distributed in the prior
  5. There is an orders of magnitude difference between your observables and the prior shock standard deviation. This usually indicates a scaling issue.
  6. Now your model crashes with a stochastic singularity warning. That is usually due to the model implying an exact linear combination between the observables. Try dropping one observable at a time to see what causes this.

model3Q.mod (5.0 KB)

1 Like

Dear Chris,
Many thanks. I have tried your suggestion and set csigma2=0. Did not solve the problem but interestingly the error message has changed to “Error using initial_estimation_checks (line 111).The initial value of the prior in _inf” Will continue checking. Thanks. Sid

Thank you for the advice.

  1. Ok noted. Will correct that.
  2. Yes I did realize that right after my posting and corrected it but the “singularity” issue is still there.
  3. Pi being the average CPI inflatation rate I presume this as a period (1982) of hyper inflation but will double-check the country data (Ghana).
  4. Ok thanks.
  5. Will try that.
    Thank you.