Page 1 of 1

Replacement variable insidea replacement variable

Posted: Wed Sep 30, 2015 9:58 am
by bdamasio
How can I put a replacement variable inside another one?
I am getting successive errors.
As an psudo-example I am trying a nonsense OLS regression, just for illustration.
For instance, I want to define:

%g="gdp"
%endogenous=" {%g} gfcf unem"

With this formulation I get the error: "{ is not defined in "EQUATION EQ1.LS GDP_CURR C {"GDP"} GFCF UNEM" "

If i write like this:

%g="gdp"
%levels = "%g gfcf unem"

I get the error: "Alpha series in specification - "gdp" "

If i write like this:

%g=gdp
%levels = "%g gfcf unem"

I get the error: "Series assigned to string in "%G=GDP". "



This is important because I want to program a dialog box with the option gdp in constant prices or gdp in current prices.

Can you help me with this please?

Thank you.
bdamasio.

Re: Replacement variable insidea replacement variable

Posted: Wed Sep 30, 2015 10:16 am
by EViews Gareth
Can't you just do:

Code: Select all

%var = "gdp" %endogenous = %var + " gcfc unem"

Re: Replacement variable insidea replacement variable

Posted: Thu Oct 01, 2015 1:45 am
by bdamasio
Thank you Gareth. It did works.