Number of cross sections in panel data
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
Number of cross sections in panel data
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
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)
Re: Number of cross sections in panel data
Thanks a lot for the prompt reply!!!
Who is online
Users browsing this forum: No registered users and 1 guest
