Home » Data » Weighting data » All-women factor in trend analysis (All-women factor in trend analysis)
Re: All-women factor in trend analysis [message #26285 is a reply to message #26284] |
Fri, 03 March 2023 09:50 |
Serala
Messages: 12 Registered: February 2023
|
Member |
|
|
Below is a part of my stata code if that helps to understand my problem. AccessAboveMed=1 is my treatment group.
*Appending survey rounds*
use [2001 data]
gen sample=2001
append using [2006 data]
replace sample=2006 if missing(sample)
append using [2011 data]
replace sample=2011 if missing(sample)
append using [2016 data]
replace sample=2016 if missing(sample)
egen strata_ID = group(sample v022)
egen cluster_ID = group(sample v001)
*Survey setting*
svyset, clear
gen wt = v005/1000000
svyset [pw=wt], psu(cluster_ID) strata(strata_ID) singleunit(centered)
*Parallel trends test*
graph twoway (scatter v133 sample if AccessAboveMed==1, msymbol(T) mcolor(blue)) (scatter v133 sample if AccessAboveMed==0, msymbol(0) mcolor(orange)) (lfit v133 sample if AccessAboveMed==1 & sample<=2011, lcolor(blue)) (lfit v133 sample if AccessAboveMed==1 & sample>2011, lcolor(blue)) (lfit v133 sample if AccessAboveMed==0 & sample<=2011, lcolor(orange)) (lfit v133 sample if AccessAboveMed==0 & sample>2011, lcolor(orange) xline(2011) legend(order(1 "Treated" 2 "Control"))), yscale(range(0 10))
|
|
|
Goto Forum:
Current Time: Mon Nov 25 19:57:31 Coordinated Universal Time 2024
|