Hi all
i am analyzing the effects of divorce for men and women on life satisfaction
For this i have long shaped data of married couples .
The treatment group consists of individuals who got divorced (only their first divorce during the observation period will be taken into consideration)
The control group consinst of individuals who never got divorced during the observation period
I still have to think about which variables i want to add in the matching step and in the regression.
My question would be: How can i check for the parallel trend assumption since the treatment (divorce) can occur in any given time period?
I don't know if this information will be helpful.
For the analysis i am using the DiD estimation combined with entropy balancing (matching which is superior to ps matching etc.)
So for the first part of the estimation i ran this...
i used those weights to run the following regression
If you need more information to help me solve this question, feel free to ask.
Thank you
i am analyzing the effects of divorce for men and women on life satisfaction
For this i have long shaped data of married couples .
The treatment group consists of individuals who got divorced (only their first divorce during the observation period will be taken into consideration)
The control group consinst of individuals who never got divorced during the observation period
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long pid byte sex float(treat kidsyes age age2) long labinc float labinc2 101 1 0 0 54 2916 23232 539725824 101 1 0 0 55 3025 16330 266668896 101 1 0 0 56 3136 23264 541213696 101 1 0 0 57 3249 4901 24019800 101 1 0 0 58 3364 15268 233111824 101 1 0 0 59 3481 18875 356265632 102 2 0 0 44 1936 0 0 102 2 0 0 45 2025 0 0 102 2 0 0 46 2116 0 0 102 2 0 0 47 2209 0 0 102 2 0 0 48 2304 0 0 102 2 0 0 49 2401 0 0 301 1 0 1 25 625 4602 21178404 301 1 0 1 26 676 21781 474411968 301 1 0 1 27 729 7976 63616576 301 1 0 1 28 784 12424 154355776 301 1 0 1 29 841 6136 37650496 301 1 0 1 30 900 11964 143137296 301 1 0 1 31 961 14725 216825632 301 1 0 1 32 1024 0 0 301 1 0 1 33 1089 6647 44182608 302 2 0 1 24 576 10175 103530624 302 2 0 1 25 625 9715 94381224 302 2 0 1 26 676 14035 196981232 302 2 0 1 27 729 10318 106461120 302 2 0 1 28 784 0 0 302 2 0 1 29 841 7976 63616576 302 2 0 1 30 900 12207 149010848 302 2 0 1 31 961 9715 94381224 302 2 0 1 32 1024 0 0 601 1 . 1 38 1444 39369 1549918208 601 1 . 1 39 1521 44278 1960541312 601 1 . 1 40 1600 41075 1687155584 601 1 . 1 41 1681 44943 2019873280 601 1 1 1 42 1764 52177 2722439424 601 1 . 1 43 1849 48010 2304960000 601 1 . 0 45 2025 76694 5881969664 601 1 . 0 46 2116 110439 12196772864 601 1 . 0 47 2209 85897 7378294784 601 1 . 0 48 2304 104500 10920250368 602 2 0 1 33 1089 42795 1831411968 602 2 0 1 34 1156 6647 44182608 602 2 0 1 35 1225 18336 336208896 602 2 0 1 36 1296 19590 383768096 602 2 0 1 37 1369 21388 457446528 602 2 0 1 38 1444 21397 457831616 602 2 0 1 39 1521 4793 22972848 602 2 0 1 40 1600 0 0 602 2 0 1 41 1681 1227 1505529 602 2 0 1 42 1764 9280 86118400 602 2 0 1 43 1849 3886 15100996 602 2 0 1 44 1936 0 0 602 2 0 1 45 2025 0 0 602 2 0 1 46 2116 600 360000 602 2 0 1 47 2209 800 640000 602 2 0 1 48 2304 2400 5760000 602 2 0 1 49 2401 2200 4840000 602 2 0 1 50 2500 2200 4840000 602 2 0 1 51 2601 3900 15210000 602 2 0 1 52 2704 7620 58064400 602 2 0 1 53 2809 8760 76737600 602 2 0 1 54 2916 8160 66585600 1602 2 0 1 40 1600 309 95481 1602 2 0 1 41 1681 13259 175801088 1602 2 0 1 42 1764 4933 24334488 1602 2 0 0 43 1849 7200 51840000 1602 2 0 0 44 1936 4200 17640000 1602 2 0 0 45 2025 3600 12960000 1602 2 0 0 46 2116 6120 37454400 1602 2 0 0 47 2209 4788 22924944 1602 2 0 0 48 2304 4800 23040000 1704 2 0 1 30 900 3860 14899600 1704 2 0 1 31 961 9029 81522840 1704 2 0 1 32 1024 13409 179801280 1704 2 0 1 33 1089 14751 217592000 1704 2 0 1 34 1156 10277 105616728 1704 2 0 1 35 1225 19864 394578496 1704 2 0 1 36 1296 23826 567678272 1704 2 0 1 37 1369 23450 549902528 1704 2 0 1 38 1444 21474 461132672 1704 2 0 1 39 1521 25811 666207744 1704 2 0 1 40 1600 27605 762036032 1704 2 0 1 41 1681 26587 706868544 1704 2 0 1 42 1764 27205 740112000 1704 2 0 1 43 1849 28223 796537728 1704 2 0 1 44 1936 30106 906371264 1704 2 0 1 45 2025 30667 940464896 1704 2 0 1 46 2116 32952 1085834240 1704 2 0 0 47 2209 32490 1055600128 1704 2 0 0 48 2304 33574 1127213440 1704 2 0 0 49 2401 34816 1212153856 1704 2 0 0 50 2500 35880 1287374336 1704 2 0 0 51 2601 28200 795240000 2101 1 0 0 56 3136 19409 376709280 2101 1 0 0 57 3249 19378 375506880 2101 1 0 0 58 3364 20356 414366720 2101 1 0 0 59 3481 20508 420578048 2101 1 0 0 60 3600 21223 450415744 2102 2 0 0 57 3249 7581 57471560 2102 2 0 0 58 3364 1074 1153476 end label values sex sex label def sex 1 "[1] maennlich", modify label def sex 2 "[2] weiblich", modify
My question would be: How can i check for the parallel trend assumption since the treatment (divorce) can occur in any given time period?
I don't know if this information will be helpful.
For the analysis i am using the DiD estimation combined with entropy balancing (matching which is superior to ps matching etc.)
So for the first part of the estimation i ran this...
Code:
set more off global exact welle_* global xvars age age2 mig foreign lifesat lifesat2 uni voctrain labinc labinc2 pgerwzeit pgerwzeit2 nounemp pgexpft pgexpft2 kids * badhlth medhlth goodhlth psbil2_? /// use "$posted/data", clear * Step 1: calculate the weights within different sub-datasets defined by gender foreach yesno in 0 1 { use "$posted/data", clear keep if female==`yesno' sort random ebalance treat $xvars welle_*, gen(w_treat) maxiter(100) targets(1) keep pid syear w_treat save "$tables/match_`yesno'", replace } * combine the sub-datasets use "$tables/match_0", clear append using "$tables/match_1" sort pid syear save "$tables/matched", replace use "$posted/data", clear merge 1:1 pid syear using "$tables/matched.dta", keep(master match) nogen
Code:
* gender-specific anayles foreach x in 0 1 { preserve keep if female==`x' foreach y in lifesat { reg d1`y' treat $xvars $exact [weight=w_treat] est store m`x'_1 qui count if treat==1 & e(sample) estadd scalar obs =r(N) } restore }
Thank you