trap replications (1,000)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 50
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 100
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 150
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 200
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 250
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 300
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 350
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 400
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 450
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 500
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 550
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 600
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 650
xxxxxxxxxxxx
Dear team,
I see my program for during bootstrap is showing red xxxx as the bootstrap continues.so I be worried?
below is my code:
use data/ONLYpafdta,clear
* Define a program to calculate PAF
capture program drop calc_paf
program define calc_paf, rclass
***unser5
mi estimate:proportion hiv_status if agecat1==1 & !missing(ipd_outtcome)
local under5prop=round(r(table)[1,2],0.01)
di "`under5prop'"
***calculate relative risk
*use data/MultipleiMPUTATION_inc,clear
*replace mi_m=mi_m-1
*drop mi_m
*ren mi_m _mj
*bys _mj:gen _mi=_n
*gen _mi_miss=1 if _mi_m==0 & missing(hiv_status)
*replace _mi_miss=0 if missing(_mi_miss) & _mi_m==0
*mi import ice, clear
**under5
mi estimate:nbreg ipd_count hiv_status year if agecat1==1 & missing(ipd_outtcome),exp(midyrpopdx) difficult
di exp(r(table)[1,1])
local RR_under5=round(exp(r(table)[1,1]),0.01)
di "`RR_under5'"
// Calculate PAF
local paf =(`under5prop'*(`RR_under5'-1))/(`RR_under5')
return scalar pafunde5 = `paf'
end
**boot strap
bootstrap r(pafunde5), reps(1000) nodrop: calc_paf
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 50
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 100
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 150
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 200
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 250
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 300
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 350
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 400
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 450
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 500
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 550
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 600
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 650
xxxxxxxxxxxx
Dear team,
I see my program for during bootstrap is showing red xxxx as the bootstrap continues.so I be worried?
below is my code:
use data/ONLYpafdta,clear
* Define a program to calculate PAF
capture program drop calc_paf
program define calc_paf, rclass
***unser5
mi estimate:proportion hiv_status if agecat1==1 & !missing(ipd_outtcome)
local under5prop=round(r(table)[1,2],0.01)
di "`under5prop'"
***calculate relative risk
*use data/MultipleiMPUTATION_inc,clear
*replace mi_m=mi_m-1
*drop mi_m
*ren mi_m _mj
*bys _mj:gen _mi=_n
*gen _mi_miss=1 if _mi_m==0 & missing(hiv_status)
*replace _mi_miss=0 if missing(_mi_miss) & _mi_m==0
*mi import ice, clear
**under5
mi estimate:nbreg ipd_count hiv_status year if agecat1==1 & missing(ipd_outtcome),exp(midyrpopdx) difficult
di exp(r(table)[1,1])
local RR_under5=round(exp(r(table)[1,1]),0.01)
di "`RR_under5'"
// Calculate PAF
local paf =(`under5prop'*(`RR_under5'-1))/(`RR_under5')
return scalar pafunde5 = `paf'
end
**boot strap
bootstrap r(pafunde5), reps(1000) nodrop: calc_paf
Comment