I need to compute the Gini coefficient over country and over waves. Therefore, I realized the following loop:
Code:
gen gini_pri=.
levelsof cname, local (c) clean
levelsof wave_1, local(w)
foreach cname in `c' {
foreach wave_1 in `w' {
ineqdec0 adjusted_pri [aw=t_weight] if cname==" `cname' " & wave_1==`wave_1'
replace gini_pri=$_gini if cname==" `cname' " & wave_1==`wave_1'
}
}
How can I solve the problem?
Thank you,
Luca
0 Response to Gini coefficient in a Loop
Post a Comment