I am examining the association between chemotherapy and survival among octogenarians with pancreatic cancer who have undergone surgery first:
Stata Code Below:
pbalchk anychemo AGE SEX racemm income2m insurancem hichar1 hlos2 ajcc8stage marginm radiationm facilitym region timeperiod
xi: logistic anychemo AGE i.SEX i.racemm i.income2m i.hichar1 i.hlos2 i.ajcc8stage i.marginm i.facilitym i.region i.timeperiod
predict prop_score
// compare _pscores before matching & save graph to disk
psmatch2 anychemo, pscore(prop_score) outcome(laststatus) caliper(.2) noreplace neighbor(1)
twoway (kdensity _pscore if _treated==1) (kdensity _pscore if _treated==0, ///
lpattern(dash)), legend( label( 1 "Chemotherapy") label( 2 "No Chemotherapy" )) ///
xtitle("propensity scores BEFORE matching") saving("/Users/winta/Documents/Research /Wang/NCDB/before", replace)
// compare _pscores *after* matching & save graph to disk
gen match=_n1
replace match=_id if match==.
duplicates tag match, gen(dup)
twoway (kdensity _pscore if _treated==1) (kdensity _pscore if _treated==0 ///
& dup>0, lpattern(dash)), legend( label( 1 "Chemotherapy") label( 2 "No Chemotherapy" )) ///
xtitle("propensity scores AFTER matching") saving("/Users/winta/Documents/Research /Wang/NCDB/after", replace)
graph combine before.gph after.gph, ycommon
predict lp, xb
graph tw kdensity lp if anychemo == 0 || kdensity lp if anychemo == 1
estat gof, group(10) table
* (goodness of fit P=0.86*)*
psmatch2 anychemo, pscore(prop_score) outcome(laststatus) caliper(.1) noreplace neighbor(1)
gen pair = _id if _treated==0
replace pair = _n1 if _treated==1
bysort pair: egen paircount = count(pair)
drop if paircount !=2
I want to clarify a few questions:
1) I want to set my caliper at 0.1 times the logarithm of the standard deviation of the propensity - by placing 0.1 in the caliper parenthesis is this calculating an absolute difference to the score and do I need to locally define my caliper to accomplish this?
2) When I change this to 0.25 the number of patients increases and I still have balance between groups - is it appropriate to use this instead if it gives me more power?
Stata Code Below:
pbalchk anychemo AGE SEX racemm income2m insurancem hichar1 hlos2 ajcc8stage marginm radiationm facilitym region timeperiod
xi: logistic anychemo AGE i.SEX i.racemm i.income2m i.hichar1 i.hlos2 i.ajcc8stage i.marginm i.facilitym i.region i.timeperiod
predict prop_score
// compare _pscores before matching & save graph to disk
psmatch2 anychemo, pscore(prop_score) outcome(laststatus) caliper(.2) noreplace neighbor(1)
twoway (kdensity _pscore if _treated==1) (kdensity _pscore if _treated==0, ///
lpattern(dash)), legend( label( 1 "Chemotherapy") label( 2 "No Chemotherapy" )) ///
xtitle("propensity scores BEFORE matching") saving("/Users/winta/Documents/Research /Wang/NCDB/before", replace)
// compare _pscores *after* matching & save graph to disk
gen match=_n1
replace match=_id if match==.
duplicates tag match, gen(dup)
twoway (kdensity _pscore if _treated==1) (kdensity _pscore if _treated==0 ///
& dup>0, lpattern(dash)), legend( label( 1 "Chemotherapy") label( 2 "No Chemotherapy" )) ///
xtitle("propensity scores AFTER matching") saving("/Users/winta/Documents/Research /Wang/NCDB/after", replace)
graph combine before.gph after.gph, ycommon
predict lp, xb
graph tw kdensity lp if anychemo == 0 || kdensity lp if anychemo == 1
estat gof, group(10) table
* (goodness of fit P=0.86*)*
psmatch2 anychemo, pscore(prop_score) outcome(laststatus) caliper(.1) noreplace neighbor(1)
gen pair = _id if _treated==0
replace pair = _n1 if _treated==1
bysort pair: egen paircount = count(pair)
drop if paircount !=2
I want to clarify a few questions:
1) I want to set my caliper at 0.1 times the logarithm of the standard deviation of the propensity - by placing 0.1 in the caliper parenthesis is this calculating an absolute difference to the score and do I need to locally define my caliper to accomplish this?
2) When I change this to 0.25 the number of patients increases and I still have balance between groups - is it appropriate to use this instead if it gives me more power?