Hi,
I'm using a dated panel with monthly observations and 2000 cross-sections (stocks). How can I "mark" certain cross sections by looking at a variable (e.g. market cap.>100) in one month, t, and take the same cross-sections in a sample command the next month, t+1, (even though their market cap. has for example decreased in month t+1 and would no longer fulfill the original if-condition from month t).
I hope I have been clear, I would very appreciate any help!
sample command in panel
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
Re: sample command in panel
So if, for example, the following sample command for month 10 (trend=10) yields 200 stock-months...
smpl @all if trend=10 and if marketcap<100
...I then want to include the same 200 stocks in month 11 (trend=11), regardless the value of their marketcap
smpl @all if trend=10 and if marketcap<100
...I then want to include the same 200 stocks in month 11 (trend=11), regardless the value of their marketcap
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: sample command in panel
If I understand correctly, I think something like this should work.
Code: Select all
smpl @all
series keep = @recode(@trend=10 and marketcap<100, 1, 0)
smpl if @sumsby(keep, @crossid)>0
Who is online
Users browsing this forum: No registered users and 2 guests
