Code:
sample
Code:
clear
input year pid var
2003 513 1500
2004 513 1550
2005 513 1500
2006 513 1600
2003 514 1600
2004 514 1600
2005 514 1700
2006 514 1800
end
Code:
sample
Code:
bysort
Code:
bysort pid (year): sample 1
0 Response to How to take a random sample of panel data and keep all person-year-observations for a particular ID
Post a Comment