Hello,
I am trying to run an instrumental variable estimation of child marriage on educational attainment using DHS data. As one of my instruments I want to use the leave-out mean of the past incidence of marriage in the previous decade by measuring the share of women that are currently aged 30-40 that got married at the ages of 12 through to 17 at PSU level. I used the following command:
*v511 is age at first marriage
*v012 is respondents current age
*V001 is the PSU
*Previous Decade PSU leave out mean share women that married at 12 years
gen byte age12=v511==12 if v012>=30&v012<=40
egen pasttotal12=total(pastage12), by(v001)
egen pastcount12= count(pastage12), by(v001)
gen pastlom12=(pasttotal12-pastage12)/(pastcount12-1)
list v001 age12 pasttotal12 pastcount12 pastlom12, sepby(v001)
The issue with this command is that it creates missing values for the sample(those ages 20-29) that I want to estimate on. Is there any other command I can use that will give me leave out mean share of past incidence of marriage at PSU level without generating missing values for my sample.
I am trying to run an instrumental variable estimation of child marriage on educational attainment using DHS data. As one of my instruments I want to use the leave-out mean of the past incidence of marriage in the previous decade by measuring the share of women that are currently aged 30-40 that got married at the ages of 12 through to 17 at PSU level. I used the following command:
*v511 is age at first marriage
*v012 is respondents current age
*V001 is the PSU
*Previous Decade PSU leave out mean share women that married at 12 years
gen byte age12=v511==12 if v012>=30&v012<=40
egen pasttotal12=total(pastage12), by(v001)
egen pastcount12= count(pastage12), by(v001)
gen pastlom12=(pasttotal12-pastage12)/(pastcount12-1)
list v001 age12 pasttotal12 pastcount12 pastlom12, sepby(v001)
The issue with this command is that it creates missing values for the sample(those ages 20-29) that I want to estimate on. Is there any other command I can use that will give me leave out mean share of past incidence of marriage at PSU level without generating missing values for my sample.
Comment