Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Martin Weiss" <martin.weiss1@gmx.de> |
To | <statalist@hsphsun2.harvard.edu> |
Subject | st: AW: decomposition concentration index |
Date | Thu, 10 Jun 2010 14:18:37 +0200 |
<> Try the ************* colnumb() ************* function for - mat b_`x' = dfdx[1,"`x'"]- HTH Martin -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von ecreceb@unex.es Gesendet: Donnerstag, 10. Juni 2010 14:01 An: statalist@hsphsun2.harvard.edu Betreff: st: decomposition concentration index I am trying to decompose the concentration index (Wagstaff et al, 1997) using the below procedure in stata 11. But, after run the model and obtain elasticities, variables are not recognize in the step: mat b_`x' = dfdx[1,"`x'"] How can I do? Thank you global xvar "age1 age2 sexo longillness symptom problem symptom2 chronic2 depression badorienti adl iadl phhealth" global zvar "alone homecare physicactiv isced1 isced2 isced3 isced4 seggen employed lnrentahogeq" dprobit frecgenprac $xvar $zvar matrix dfdx=e(dfdx) sca need=0 foreach x of global xvar { qui { mat b_`x' = dfdx[1,"`x'"] sca b_`x' = b_`x'[1,1] corr `x', c sca cov_`x' = r(cov_12) sum `x' sca m_`x' = r(mean) sca elas_`x' = (b_`x'*m_`x')/m_frecgenprac sca CI_`x' = 2*cov_`x'/m_`x' sca con_`x' = elas_`x'*CI_`x' sca prcnt_`x' = con_`x'/CI sca need=need+con_`x' } di "`x' elasticity:", elas_`x' di "`x' concentration index:", CI_`x' di "`x' contribution:", con_`x' di "`x' percentage contribution:", prcnt_`x' } * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/