Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
Attachment:
statalist.doc
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: decomposition concentration index
From
[email protected]
To
[email protected]
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'
}
Description: MS-Word document