i have a panel data of 1,352 companies from 5 countries(2003-2017). yet, there is a lots of variables missing.
i want to delete companies which has no observation for 5 consecutive years.
could eviews do that?
I'm really waiting for your help
thanks in advance
I also attach my data
delete/filtering Panel Data
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
delete/filtering Panel Data
- Attachments
-
- all data.xlsx
- (5.83 MiB) Downloaded 294 times
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: delete/filtering Panel Data
Something like:
Where Y is the name of the series.
Code: Select all
pagecontract if @obsby(y, @crossid) > 0
Where Y is the name of the series.
Follow us on Twitter @IHSEViews
Re: delete/filtering Panel Data
pardon me
could u please explain it more?
thanks
could u please explain it more?
thanks
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: delete/filtering Panel Data
Once you have the data in EViews, you can use the pagecontract command to remove observations.
Follow us on Twitter @IHSEViews
Re: delete/filtering Panel Data
it should be easy but i dont it well
for instance i wanna remove "b" and "d" because it has no observation for 3 consecutive years. what should pagecontract command be?
Name Year gdp inflation export
a 2003 12 8 14
a 2004 13 7 17
a 2005 14 6 19
a 2006 15 9 20
b 2003 na 8 13
b 2004 na 7 15
b 2005 na 6 12
b 2006 12 5 10
c 2003 21 8 15
c 2004 23 7 14
c 2005 25 9 18
c 2006 27 6 14
d 2003 21 8 na
d 2004 23 7 na
d 2005 25 9 na
d 2006 27 6 14
thank you
for instance i wanna remove "b" and "d" because it has no observation for 3 consecutive years. what should pagecontract command be?
Name Year gdp inflation export
a 2003 12 8 14
a 2004 13 7 17
a 2005 14 6 19
a 2006 15 9 20
b 2003 na 8 13
b 2004 na 7 15
b 2005 na 6 12
b 2006 12 5 10
c 2003 21 8 15
c 2004 23 7 14
c 2005 25 9 18
c 2006 27 6 14
d 2003 21 8 na
d 2004 23 7 na
d 2005 25 9 na
d 2006 27 6 14
thank you
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: delete/filtering Panel Data
Put those three series into a group, called G.
Then:
Then:
Code: Select all
pagecontract if @sumsby(@rnas(g), @crossid)=0
Follow us on Twitter @IHSEViews
Who is online
Users browsing this forum: No registered users and 8 guests