What's efficient way
Posted: Tue May 24, 2016 10:39 pm
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
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