你试试:
forvalues p=2000/2007 {
centile marketvalue if year==`p', centile (10 20 30 40 50 60 70 80 90)
forvalues i=1/9 {
replace group = `i'+1 if marketvalue>=r(c_`i') & year ==`p' //replace group='i'+1 if marketvalue>=r(c_10*'i')
}
}
[此贴子已经被作者于2008-11-15 13:26:41编辑过]
eblog 金钱 +50 魅力 +5 奖励 2008-11-16 9:16:08