Page 1 of 1

Identities in models with pool equations

Posted: Fri Feb 01, 2019 11:16 am
by ottavio
Hello,
I'm trying to build a model using the pool object.
There is a very convenient way to proceed that allows to build a model with an equation estimated with a sequence o pool commands

for instance I can do the following for a consumption equation:
eu28_C.ls C? Y?(-1)
eu28_C.makemodel(M_europe)

At this point I have a model with an equation for each European EU country

I also found out that I can add to the same model an additional equation, for instance for investment
eu28_I.ls I? C?

I can easily edit the model and add this new equation to M_europe so that its text version will look like this:
:eu28_C
:eu28_I
The model will solve. Beautifull!

But now I have the problem
there is not (or I can not find the way to do it) the possibility to add a single identity which using pool commands would be something like
GDP? = C? + I?

I have to type in 28 identities
GDP_FRA = C_FRA + I_FRA
GDP_ITA = C_ITA + I_ITA
... and so forth

Is there a way out? Some trick that I do not know?
Are you planning to add this opportunity in future versions/upgrades?

thanks a lot
Ottavio

Re: Identities in models with pool equations

Posted: Fri Feb 01, 2019 2:55 pm
by EViews Gareth

Code: Select all

%list = eu28.@crossids for %j {%list} m_europe.append @identity gdp_{%j} = c_{%j} + i_{%j} next

Re: Identities in models with pool equations

Posted: Mon Feb 04, 2019 9:09 am
by ottavio
Thank you so much.
I think I will use those lines of command to build a number of models (one for each identity) and then nest all of them in a model

Ottavio