Generating lagged variables for panel data

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

Marc150
Posts: 10
Joined: Fri Mar 17, 2017 10:50 am

Generating lagged variables for panel data

Postby Marc150 » Thu Apr 20, 2017 7:09 am

Is there something special that you have to do to generate lagged variables when using panel data?
When I try the very simple code

'series a=b(-1)' or

'genr a=b(-1)'

the series a ends up having a bunch of missing values, for reasons that I don't understand.

Thanks in advance,
Marc

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

Re: Generating lagged variables for panel data

Postby EViews Gareth » Thu Apr 20, 2017 7:13 am

No, nothing special. You are doing it correctly
Follow us on Twitter @IHSEViews

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: Generating lagged variables for panel data

Postby startz » Thu Apr 20, 2017 7:16 am

Remember that the first observation for each cross-section should be missing.

Marc150
Posts: 10
Joined: Fri Mar 17, 2017 10:50 am

Re: Generating lagged variables for panel data

Postby Marc150 » Thu Apr 20, 2017 7:29 am

Thanks (I've just realized that I was sampling only a subset of observations)


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 19 guests