I am using the following command to generate inequality indices for the variable "rendomdefpc" for each combination of 27 states (uf) and 5 years (ano):
Among the indices that the results of the command "inequal" provide I'm only interested in the Gini coefficient, in the Theil mean log deviation measures and in the Theil entropy measure, and tried to use the following syntax to capture them:
The syntax did not work and Stata generated the following error message:
I would once again be able to count on your help and solve this problem more.
Thanks in advance
Girlan
levelsof uf, local(ufs)
foreach c of local ufs {
levelsof ano if uf == `c', local(anos)
foreach y of local anos {
display `"uf == `c', ano == `y'"'
inequal rendomdefpc [fw=pesopes] if uf == `c' & ano == `y'
}
}
foreach c of local ufs {
levelsof ano if uf == `c', local(anos)
foreach y of local anos {
display `"uf == `c', ano == `y'"'
inequal rendomdefpc [fw=pesopes] if uf == `c' & ano == `y'
}
}
Among the indices that the results of the command "inequal" provide I'm only interested in the Gini coefficient, in the Theil mean log deviation measures and in the Theil entropy measure, and tried to use the following syntax to capture them:
capture postutil clear
postfile handle ufs ano gini theil_t theil_l using desiguald, replace
levelsof uf, local(ufs)
foreach c of local ufs {
levelsof ano if uf == `c', local(anos)
foreach y of local anos {
display `"uf == `c', ano == `y'"'
inequal rendomdefpc [fw=pesopes] if uf == `c' & ano == `y'
post handle (`c') (`y') (`r(gini)') (`r(theil_t)') (`r(theil_l)')
}
}
postclose handle
postfile handle ufs ano gini theil_t theil_l using desiguald, replace
levelsof uf, local(ufs)
foreach c of local ufs {
levelsof ano if uf == `c', local(anos)
foreach y of local anos {
display `"uf == `c', ano == `y'"'
inequal rendomdefpc [fw=pesopes] if uf == `c' & ano == `y'
post handle (`c') (`y') (`r(gini)') (`r(theil_t)') (`r(theil_l)')
}
}
postclose handle
invalid syntax
post: above message Corresponds to 3 expression, variable gini
post: above message Corresponds to 3 expression, variable gini
Thanks in advance
Girlan