I'm still a novice when it comes to programming, and have a problem.
I've got a large data set, based on roughly 20,000 hunters and 15 years.
What I want is the minimum length of each alligator for each hunter, for each year.
The current code is
for !year = 2000 to 2014
smpl if harvestyear=!year
for !hunter= 1 to 21534
smpl if hunter_ser=!hunter
series min_hide=@min(length)
next
next
The problem (obviously) is that this gives the minimum length for each hunter over the entire 15 year period. I'm looking for an elegant and efficient way to break it down further, into the minimum length per hunter per year.
TIA for any ideas.
B
What's efficient way
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: What's efficient way
What structure do your data have?
It might be that something like:
will work.
It might be that something like:
Code: Select all
for !year = 2000 to 2014
smpl if harvestyear=!year
series min_hide = @minsby(length, hunter_ser)
next
Re: What's efficient way
What structure do your data have?
It might be that something like:Code: Select all
... will work.[/quote] Brilliant, works perfectly. Thanks
Who is online
Users browsing this forum: No registered users and 2 guests
