Counterfactual code error

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Counterfactual code error

Postby gologan » Sat Jan 28, 2017 2:04 pm

Hi everyone,

As part of my research I must perform a counterfactual analysis between two different simulated economies, however, I am having trouble with the code. The structure of my counterfactual code is as follows:

1. Benchmark model loading.
2. Sample size definition.
3. Initial values definition (previously estimated values of the parameters and standard deviations of structural shocks are taken as initial values).
4. Alternative model loading.
5. Alternative model simulation taking into account the initial values.

The error shown is: "Error using load - Number of columns on line 14 of ASCII file Modelo_benchmark.mod must be the same as previous lines". This makes sense since I am loading a code that defines the economic model and not a database. Given this error I wonder if Im making a concept error in the code or is it just a programmation mistyping. If necessary, I attach the code for the counterfactual analysis and the benchmark model code.

Thank you very much!
Attachments
Contrafactual.m
(3.14 KiB) Downloaded 80 times
Modelo_benchmark.mod
(8.83 KiB) Downloaded 71 times
gologan
 
Posts: 7
Joined: Fri Mar 04, 2016 5:39 am

Re: Counterfactual code error

Postby jpfeifer » Mon Jan 30, 2017 9:44 am

Why exactly are you trying to load a mod-file, which is a text file. Shouldn't you be running Dynare on the mod-file and then load the _results.mat-file?
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Counterfactual code error

Postby gologan » Mon Feb 06, 2017 4:23 am

Dear Johannes,

Thank you very much for your answer, it helped me a lot to correct my mistake on the code. Now everything is running fine.
gologan
 
Posts: 7
Joined: Fri Mar 04, 2016 5:39 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 9 guests