Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: decomposition concentration index


From   ecreceb@unex.es
To   statalist@hsphsun2.harvard.edu
Subject   st: decomposition concentration index
Date   Thu, 10 Jun 2010 14:01:04 +0200 (CEST)

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'
}



Attachment: statalist.doc
Description: MS-Word document



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index