if conditional by using loops outside the model

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.

if conditional by using loops outside the model

Postby mcastillo » Fri Oct 26, 2012 7:44 pm

Hello may you help me looking at this code. It is supposed to get the loop @#for pp in 0:1 in line 56, which it is being grabbed for the if conditional in lines 111 to 114.

i need to solve the model for these conditionals, but learning how to implement if condiitonal within model block but by using a loop from outside as in line 56. May you help me to figure it out please? :)

The error message is

Starting preprocessing of the model file ...
ERROR: There are 104 equations but 52 endogenous variables!


It’s like I'd have the double of equations but not, it is doubling the number of equations because there are two values 0 or 1 which enter into the conditional…what would be the error. How dynare it is not reading the @#for properly.
Attachments
marola.mod
(8.45 KiB) Downloaded 64 times
mcastillo
 
Posts: 5
Joined: Wed Sep 28, 2011 8:01 pm

Re: if conditional by using loops outside the model

Postby SébastienVillemot » Mon Dec 03, 2012 2:05 pm

You cannot have two different models in the same MOD file. You should split this into 2 MOD-files (or maybe even 3, where a file contains all the factorized parts, and is @#include'd from the other 2).
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 5 guests