problem with lagged variables in groups

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

pcruz_cc
Posts: 3
Joined: Mon Apr 02, 2018 7:44 am

problem with lagged variables in groups

Postby pcruz_cc » Wed Apr 25, 2018 6:42 am

Hello,
I am having a problem when working with lagged variables in groups. Lets say I have a group G with the variable X(-1) in it:

group G
G.add X(-1)

I want to form another group G2 with a transformation of the first variable of G:

!a = 2
group G2
G2.add G(1)*!a

This should give me a group named G2 with the variable X(-1)*2 in it. However, I am getting a G2 group with the variable X*2 in it. I have also noticed that if no transformation is done, then the lagged variable is correctly asigned to G2, but if I write

G2.add (G(1))

I also get X in the group instead of X(-1). Is there a way to fix this?

(im working with Eviews 10)

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13294
Joined: Tue Sep 16, 2008 5:38 pm

Re: problem with lagged variables in groups

Postby EViews Gareth » Wed Apr 25, 2018 7:41 am

Code: Select all

%s = g.@seriesname(1)
g2.add !a*{%s}
Follow us on Twitter @IHSEViews

pcruz_cc
Posts: 3
Joined: Mon Apr 02, 2018 7:44 am

Re: problem with lagged variables in groups

Postby pcruz_cc » Wed Apr 25, 2018 8:05 am

excelent! thanks!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 12 guests