Number of cross sections in panel data

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

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

Quant
Posts: 6
Joined: Sun Sep 16, 2012 7:41 am

Number of cross sections in panel data

Postby Quant » Sat Sep 29, 2012 3:30 pm

Is there any way to find the number of cross-sections for a sample in a panel worksheet with unbalanced data? Eviews reports the number of observations in the upper part near the sample but not the associated cross-sections. A simple way is to regress a key variable on a constant and from the reg window I can get the required data. Is there another way? Thanks in advance.

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

Re: Number of cross sections in panel data

Postby EViews Gareth » Sat Sep 29, 2012 4:38 pm

Do a one-way tabulation on the cross-section identifier, and see how many categories there are. In a program:

Code: Select all

series temp = @crossid freeze(temp2, mode = overwrite) temp.freq %temp = temp2(5,1) string b = %temp %temp2 = @mid(%temp, 23) string a = %temp2 scalar n_cross_sections = @val(%temp2)

Quant
Posts: 6
Joined: Sun Sep 16, 2012 7:41 am

Re: Number of cross sections in panel data

Postby Quant » Sun Sep 30, 2012 11:15 am

Thanks a lot for the prompt reply!!!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 1 guest