Hi
I am trying to generate the indicator reported in the first column of the Table 16.1.2 - Percentage who have ever experienced physical violence since age 15 using the syntax below
use "KEMR72FL.DTA", clear
cap gen dwt = md005/1000000
cap label define yesno 0 "no" 1 "yes" //for all yes/no binary variables
**EXPERIENCED PHYSICAL VIOLENCE
//ever
gen dv_phy = 0 if mv044==1
foreach z in a b c d e f g h i j k l m n {
replace dv_phy = 1 if md105`z'>=1 & md105`z'<=4 //violence by current partner
}
replace dv_phy = 1 if md130a>=1 & md130a<=4 //violence by former partner
replace dv_phy = 1 if md115y==0 //violence by anyone other than partner
*replace dv_phy = 1 if d118y==0 //violence during pregnancy
label var dv_phy "Experienced physical violence since age 15"
label val dv_phy yesno
//in the last 12 months
gen dv_phy_12m = 0 if mv044==1
foreach z in a b c d e f g h i j k l m n {
replace dv_phy_12m = 1 if md105`z'==1 | md105`z'==2
}
replace dv_phy_12m = 1 if md117a==1 | md117a==2 | md130a==1
label val dv_phy_12m yesno
label var dv_phy_12m "Experienced physical violence in past 12 mos"
replace dv_phy = 100 if dv_phy == 1
tabstat dv_phy [aw=dwt] if inrange(mv013, 1, 7), statistics(mean) save
I am finding the value 44.32217 for those aged 15-49 whereas the table reports 43.9.
Any help will be appreciated. Thanks in advance