nobs per cross-section in panel
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
nobs per cross-section in panel
I'm probably missing something obvious, but what's the function to return the number of obsevations in each cross-section in an unbalanced panel?
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: nobs per cross-section in panel
If you want to link them up to the original observation, use @obsby, as in
To get the results in a simple vector, you can just grab the first observation in each cross-section and use stom to extract the values
The relational database way of doing this is to create a cross-section only page and linking from the original page, but the above is probably enough for what you want to do.
While the above isn't so bad, what we should do to make this easier is to allow you to output the results from the one-way tabulation into a matrix.
Code: Select all
series idcount=@obsby(@crossid, @crossid)
Code: Select all
smpl @all
series idcount=@obsby(@crossid, @crossid)
smpl if @obsid=1
stom(idcount, counts)
While the above isn't so bad, what we should do to make this easier is to allow you to output the results from the one-way tabulation into a matrix.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: nobs per cross-section in panel
Thanks Glenn, that's what I needed.
Who is online
Users browsing this forum: No registered users and 2 guests
