Created
May 1, 2013 17:06
-
-
Save mcorey/5496631 to your computer and use it in GitHub Desktop.
Script to produce my first two dissertation papers, in STATA.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* .Do file to run the ATUS to look at Parental Time Use by income */ | |
#delimit; | |
clear; | |
clear matrix; | |
version 11; | |
set mem 400m; | |
set mat 1600; | |
set more off; | |
cd "/Users/michaelcorey/Dropbox/School Work/Diss Paper 1 -- weekend work over time/"; | |
*do "/Users/michaelcorey/Dropbox/School Work/Diss Paper 1 -- weekend work over time/Diss Paper 1 Data/extract_mcorey_uchicago_edu5_atus.do"; | |
* compress; | |
* save "diss paper 1 atusx.dta", replace; | |
do "/Users/michaelcorey/Dropbox/School Work/Diss Paper 1 -- weekend work over time/Diss Paper 1 Data/extract_mcorey_uchicago_edu7_atus.do"; | |
save "diss paper 1 extra vars.dta", replace; | |
do "/Users/michaelcorey/Dropbox/School Work/Diss Paper 1 -- weekend work over time/Diss Paper 1 Data/BuildPresserShiftExtract17may2012.do"; | |
save "pressershiftextract.dta", replace; | |
#delimit; | |
use "diss paper 1 atusx.dta"; | |
merge 1:1 caseid lineno using "diss paper 1 extra vars.dta", gen(mextra); | |
merge 1:1 caseid lineno using "pressershiftextract.dta", gen(mshift); | |
merge 1:1 caseid lineno using "diss paper 1 evening time vars.dta", gen(evars); | |
#delimit; | |
gen dayshift = work8am4pm; | |
label variable dayshift "Minutes of Work 8am to 4pm"; | |
gen eveshift = work4pm12am; | |
label variable eveshift "Minutes of Work 4pm to Midnight"; | |
gen nightshift = work12am4am + work4to8am; | |
label variable nightshift "Minutes of Work Midnight to 4am + 4am to 8am)"; | |
gen _dayshift = (dayshift >= eveshift) & (dayshift >= nightshift) & dayshift != 0; | |
gen _eveshift = (eveshift > nightshift) & (eveshift > dayshift) & eveshift != 0; | |
gen _nightshift = (nightshift > dayshift) & (nightshift >= eveshift) & nightshift !=0; | |
gen shift = .; | |
replace shift= 2 if _eveshift == 1; | |
replace shift= 3 if _nightshift == 1; | |
replace shift= 1 if _dayshift == 1; | |
label define lblshift 1 "Day Shift" 2 "Evening Shift" 3 "Night Shift"; | |
label values shift lblshift; | |
label variable shift "Shift Where Most Minutes Are Worked"; | |
*Make short, med, and long hour variables; | |
gen work25q = work_hours <= 7.016667 ; | |
gen work50q = work_hours > 7.016667 & work_hours < 9.36667 ; | |
gen work75q = work_hours >= 9.36667 ; | |
summ work25q work50q work75q ; | |
//make some variables for P.England | |
preserve; | |
keep caseid shift; | |
compress; | |
save corey_atus_shift_vars.dta, replace; | |
restore; | |
gen work_hours = working/60; //convert work minutes to hours | |
gen work10 = work_hours >= 10 & work_hours != .; //create flag for 10+ hours working on day | |
label variable work10 "Working 10+ hours"; //label 10+ hours variable | |
label define work10lbl | |
0 "Work <10 hrs" 1 "Work 10+ Hrs"; //define 10+ hours label | |
label values work10 work10lbl; //apply 10+ hours label | |
recode sex (1=1 "Male") (2=0 "Female"), gen(male); //Create male | |
recode work_hours (2/24 = 1 "2+ hours") | |
(0/2 = 0 "<2 hours") , gen(work2); //create flag for 2 work hours | |
label variable work2 "Working 2+ hours"; //label 2+ hours variable | |
recode work_hours (0 = 0 "No Work") //Create banded work10 hours | |
(10/24 = 2 "10+ hours") | |
(else = 1 "Work <10 hours"), gen(work10band); | |
label variable work10band "10+ Hours Banded"; | |
recode famincome (996/998=.); //set missing values for family income | |
recode famincome (1/6=1 "<$20k") (7/10=2 "$20k-$39k") | |
(11/14=3 "$40k-$99k") (15/16 = 4 "$100k+") | |
(.=.), gen(faminc4band); //Recode family income into 3 bands | |
label variable faminc4band "Family Income, 4 bands"; | |
tab famincome faminc4band, miss; //Check family income variables | |
recode day (1= 1 "Weekend") (7= 1 "Weekend") | |
(2/6 = 0 "Weekday"), gen(weekend); //Create weekend variable | |
label variable weekend "Weekend"; | |
tab day weekend; //Check weekend variable | |
recode race (100=1 "White") //Create a 4-cat race variable | |
(200=2 "Black") (501=2) (505/507=2 ) (510=2) (514=2) | |
(401=3 "Asian") (503=3 ) | |
(else = 4 "Other"), gen(race4); | |
label variable race4 "4-cat Race"; | |
recode race4 (1=1 "White") (.=2 Hispanic) (2=3 "Black") (3=4 "Asian") (4=5 "Other"), gen(race4h); | |
replace race4h = 2 if hispan > 100 & race4 != 2; | |
label variable race4h "Race + Hispanic"; | |
tab race race4; //Check 4-cat race variable\ | |
tab race4 race4h; | |
recode fullpart (2=1 "Part Time") (1=0 "Full Time") (else = .), | |
gen(parttime); | |
label variable parttime "Part Time"; | |
tab parttime fullpart, miss; | |
recode marst (1=1 "Married") (else=0 "Single"), | |
gen(married); //Generate Married | |
label variable married "Married"; | |
recode marst (1=0 "Married") (else=1 "Single"), | |
gen(single); //Generate Single | |
label variable single "Not Married"; | |
recode educ (10/20 = 1 "lths") (21 = 2 "HS") //Generate Smaller Education Codes | |
(30/32 = 3 "some coll") (40/43 = 4 "College +") | |
, gen(educ4); | |
label variable educ4 "4-Cat Education"; | |
tab educ educ4; | |
recode fullpart(1=1 "Full Time") (2=2 "Part Time") (99=3 "Out of Labor Force"), gen(wfstat); | |
label variable wfstat "Work Force Status"; | |
gen evework = work6to7pm + work7to8pm; | |
label variable evework "Mins work between 6pm and 8pm"; | |
gen evework_h = evework/60; | |
label variable evework_h "Hours of work between 6pm and 8pm"; | |
gen evework_10 = evework>=10; | |
label variable evework_10 "At least 10min of work 6-8pm"; | |
gen evework_15 = evework>=15; | |
label variable evework_15 "At least 15min of work 6-8pm"; | |
gen evework_120 = evework==120; | |
label variable evework_120 "Works from 6pm-8pm"; | |
gen fulltime = fullpart == 1; | |
label variable fulltime "Works Fulltime"; | |
gen _evewrkall = evewrkall >0 & evewrkall != .; | |
label variable _evewrkall "Does ANY work 6-9pm"; | |
#delimit; //Make dummies for race5 (with hispanic) | |
tab race4h , gen(r); | |
label variable r1 "White"; | |
label variable r2 "Hispanic"; | |
label variable r3 "Black"; | |
label variable r4 "Asian"; | |
label variable r5 "Other"; | |
#delimit; //Make Dummies for ed | |
gen lths = educ4 == 1; | |
gen hs = educ4 == 2; | |
gen somecol = educ4 == 3; | |
gen college = educ4 == 4; | |
#delimit; | |
gen noworkday = work_hours == 0; | |
label variable noworkday "No Work on Day"; | |
#delimit; | |
//Mean Center Age | |
egen agemean = mean(age); | |
gen agemc = age - agemean; | |
corr agemc age; | |
drop rbwt* rehwt* rwt* ; | |
save "/Users/michaelcorey/Dropbox/R Private/diss paper 1 for R.dta", replace; | |
keep if ageychild < 18; //Keep only if child under 13 in HH | |
keep if age>18 & age<60; | |
keep if schlcoll<= 1 | schlcoll >= 99; | |
drop if noworkday == 1; | |
#delimit; | |
//Descriptive Table for education and evening work | |
table educ4 male fullpart [aw=wt06] if weekend == 0, | |
c(mean work6to7pm mean work7to8pm mean evework_10 n evework); | |
table faminc4band male fullpart [aw=wt06] if weekend == 0, | |
c(mean work6to7pm mean work7to8pm mean evework_10 n evework); | |
table educ4 male fullpart [aw=wt06] if weekend == 0, | |
c(mean work10 n work10); | |
table faminc4band male fullpart [aw=wt06] if weekend == 0, | |
c(mean work10 n work10); | |
#delimit; | |
//preserve; | |
keep if weekend == 0; //Select in only weekdays! | |
drop if fullpart == 99; //Drop those reporting themselves not in the labor force | |
#delimit; | |
tobit evework ib2.educ4 [aw=wt06], ll(0) ul(120); | |
tobit evework ib2.educ4 male [aw=wt06], ll(0) ul(120); | |
tobit evework ib2.educ4 male agemc [aw=wt06], ll(0) ul(120); | |
tobit evework ib2.educ4 male agemc [aw=wt06], ll(0) ul(120); | |
tobit evework ib2.educ4 male agemc ageychild hh_numkids [aw=wt06], ll(0) ul(120); | |
tobit evework ib2.educ4 male agemc hh_numkids work_hours [aw=wt06], ll(0) ul(120); | |
tobit evework ib2.educ4 male agemc fullpart ageychild hh_numkids work_hours [aw=wt06], ll(0) ul(120); | |
#delimit; | |
tobit evework ib2.educ4 male agemc ageychild hh_numkids work_hours work10 [aw=wt06], ll(0) ul(120); | |
margins educ4; | |
margins educ4, predict(ystar(0,120)); | |
margins educ4, predict(pr(0,120)); | |
#delimit; | |
tobit evework ib2.faminc4band male agemc ageychild hh_numkids single work_hours work10 [aw=wt06], ll(0) ul(120); | |
margins faminc4band; | |
margins faminc4band, predict(ystar(0,120)); | |
margins faminc4band, predict(pr(0,120)); | |
#delimit; | |
/* logistic evework_15 ib3.educ4##male agemc ageychild hh_numkids single work_hours [pw=wt06]; | |
test 1.male + 1.educ4 + 1.educ4#1.male = 1.male; //Test LTHS Educated Males by Male Ref | |
test 1.male + 2.educ4 + 2.educ4#1.male = 1.male; //Test HS Educated Males by Males Ref | |
test 1.male + 4.educ4 + 4.educ4#1.male = 1.male; //Test College Educated Males by Male Ref | |
test 1.male + 1.educ4 + 1.educ4#1.male == 1.male + 2.educ4 + 2.educ4#1.male; //Test LTHS and HS | |
test 1.male + 1.educ4 + 1.educ4#1.male == 1.male + 4.educ4 + 4.educ4#1.male; //Test LTHS and Coll | |
test 1.male + 2.educ4 + 2.educ4#1.male == 1.male + 4.educ4 + 4.educ4#1.male; //Test HS and Coll | |
#delimit; | |
lincom 1.male + 1.educ4 + 1.educ4#1.male; //Calculate Male Joint Effects | |
lincom 1.male + 2.educ4 + 2.educ4#1.male; //Calculate Male Joint Effects | |
lincom 1.male + 3.educ4 + 3.educ4#1.male; //Calculate Male Joint Effects | |
lincom 1.male + 4.educ4 + 4.educ4#1.male; //Calculate Male Joint Effects */ | |
#delimit; | |
tobit evework ib3.educ4##male agemc ageychild hh_numkids single work_hours noworkday [aw=wt06], ll(0) ul(120) ; | |
#delimit; | |
test 1.male + 1.educ4 + 1.educ4#1.male = 1.male; //Test LTHS Educated Males by Some College Educated Males | |
test 1.male + 2.educ4 + 2.educ4#1.male = 1.male; //Test HS Educated Males by Some College Educated Males | |
test 1.male + 4.educ4 + 4.educ4#1.male = 1.male; //Test College Educated Males by Some College Educated Males | |
test 1.male + 1.educ4 + 1.educ4#1.male == 1.male + 2.educ4 + 2.educ4#1.male; //Test LTHS and HS | |
test 1.male + 1.educ4 + 1.educ4#1.male == 1.male + 4.educ4 + 4.educ4#1.male; //Test LTHS and Coll | |
test 1.male + 2.educ4 + 2.educ4#1.male == 1.male + 4.educ4 + 4.educ4#1.male; //Test HS and Coll | |
lincom 1.male + 1.educ4 + 1.educ4#1.male; //Test and Calculate Male Joint Effects | |
lincom 1.male + 2.educ4 + 2.educ4#1.male; //Test and Calculate Male Joint Effects | |
lincom 1.male + 4.educ4 + 4.educ4#1.male; //Test and Calculate Male Joint Effects | |
margins educ4#male; //xb marginal effect | |
margins educ4#male, predict(ystar(0,121)); //ystar marginal effect | |
margins educ4#male, predict(pr(0,121)); //within range marginal effect | |
#delimit; | |
tobit evewrkall ib3.educ4##male agemc ageychild hh_numkids single work_hours noworkday [aw=wt06], ll(0) ul(180) ; | |
#delimit; | |
test 1.male + 1.educ4 + 1.educ4#1.male = 1.male; //Test LTHS Educated Males by Some College Educated Males | |
test 1.male + 2.educ4 + 2.educ4#1.male = 1.male; //Test HS Educated Males by Some College Educated Males | |
test 1.male + 4.educ4 + 4.educ4#1.male = 1.male; //Test College Educated Males by Some College Educated Males | |
test 1.male + 1.educ4 + 1.educ4#1.male == 1.male + 2.educ4 + 2.educ4#1.male; //Test LTHS and HS | |
test 1.male + 1.educ4 + 1.educ4#1.male == 1.male + 4.educ4 + 4.educ4#1.male; //Test LTHS and Coll | |
test 1.male + 2.educ4 + 2.educ4#1.male == 1.male + 4.educ4 + 4.educ4#1.male; //Test HS and Coll | |
lincom 1.male + 1.educ4 + 1.educ4#1.male; //Test and Calculate Male Joint Effects | |
lincom 1.male + 2.educ4 + 2.educ4#1.male; //Test and Calculate Male Joint Effects | |
lincom 1.male + 4.educ4 + 4.educ4#1.male; //Test and Calculate Male Joint Effects | |
margins educ4#male; //xb marginal effect | |
margins educ4#male, predict(ystar(0,180)); //ystar marginal effect | |
margins educ4#male, predict(pr(0,180)); //within range marginal effect | |
#delimit; | |
tobit evewrkhome ib3.educ4##male agemc ageychild hh_numkids single work_hours noworkday [aw=wt06], ll(0) ul(180) ; | |
#delimit; | |
test 1.male + 1.educ4 + 1.educ4#1.male = 1.male; //Test LTHS Educated Males by Some College Educated Males | |
test 1.male + 2.educ4 + 2.educ4#1.male = 1.male; //Test HS Educated Males by Some College Educated Males | |
test 1.male + 4.educ4 + 4.educ4#1.male = 1.male; //Test College Educated Males by Some College Educated Males | |
test 1.male + 1.educ4 + 1.educ4#1.male == 1.male + 2.educ4 + 2.educ4#1.male; //Test LTHS and HS | |
test 1.male + 1.educ4 + 1.educ4#1.male == 1.male + 4.educ4 + 4.educ4#1.male; //Test LTHS and Coll | |
test 1.male + 2.educ4 + 2.educ4#1.male == 1.male + 4.educ4 + 4.educ4#1.male; //Test HS and Coll | |
lincom 1.male + 1.educ4 + 1.educ4#1.male; //Test and Calculate Male Joint Effects | |
lincom 1.male + 2.educ4 + 2.educ4#1.male; //Test and Calculate Male Joint Effects | |
lincom 1.male + 4.educ4 + 4.educ4#1.male; //Test and Calculate Male Joint Effects | |
margins educ4#male; //xb marginal effect | |
margins educ4#male, predict(ystar(0,180)); //ystar marginal effect | |
margins educ4#male, predict(pr(0,180)); //within range marginal effect | |
#delimit; | |
tobit evewrknothome ib3.educ4##male agemc ageychild hh_numkids single work_hours noworkday [aw=wt06], ll(0) ul(180) ; | |
#delimit; | |
test 1.male + 1.educ4 + 1.educ4#1.male = 1.male; //Test LTHS Educated Males by Some College Educated Males | |
test 1.male + 2.educ4 + 2.educ4#1.male = 1.male; //Test HS Educated Males by Some College Educated Males | |
test 1.male + 4.educ4 + 4.educ4#1.male = 1.male; //Test College Educated Males by Some College Educated Males | |
test 1.male + 1.educ4 + 1.educ4#1.male == 1.male + 2.educ4 + 2.educ4#1.male; //Test LTHS and HS | |
test 1.male + 1.educ4 + 1.educ4#1.male == 1.male + 4.educ4 + 4.educ4#1.male; //Test LTHS and Coll | |
test 1.male + 2.educ4 + 2.educ4#1.male == 1.male + 4.educ4 + 4.educ4#1.male; //Test HS and Coll | |
lincom 1.male + 1.educ4 + 1.educ4#1.male; //Test and Calculate Male Joint Effects | |
lincom 1.male + 2.educ4 + 2.educ4#1.male; //Test and Calculate Male Joint Effects | |
lincom 1.male + 4.educ4 + 4.educ4#1.male; //Test and Calculate Male Joint Effects | |
margins educ4#male; //xb marginal effect | |
margins educ4#male, predict(ystar(0,180)); //ystar marginal effect | |
margins educ4#male, predict(pr(0,180)); //within range marginal effect | |
#delimit; | |
/* logistic work10 ib3.educ4##male agemc ageychild hh_numkids single work_hours noworkday [pw=wt06]; | |
#delimit; | |
lincom 1.male + 1.educ4 + 1.educ4#1.male; //Calculate Male Joint Effects | |
lincom 1.male + 2.educ4 + 2.educ4#1.male; //Calculate Male Joint Effects | |
lincom 1.male + 3.educ4 + 3.educ4#1.male; //Calculate Male Joint Effects | |
lincom 1.male + 4.educ4 + 4.educ4#1.male; //Calculate Male Joint Effects | |
#delimit; | |
test 1.male + 4.educ4 + 4.educ4#1.male = 1.male; //Test LTHS Educated Males by Male Ref | |
test 1.male + 2.educ4 + 2.educ4#1.male = 1.male; //Test HS Educated Males by Males Ref | |
test 1.male + 4.educ4 + 4.educ4#1.male = 1.male; //Test College Educated Males by Male Ref | |
*/ | |
#delimit; | |
regress evework ib2.educ4##male agemc ageychild hh_numkids single work_hours work10 [aw=wt06] if evework != 0; | |
tobit evework ib2.educ4##male agemc ageychild hh_numkids single work_hours | |
[aw=wt06] if evework != 0, ll(0) ul(120); | |
#delimit; | |
eststo eveall: quietly tobit evewrkall ib3.educ4##male agemc ageychild hh_numkids single work_hours [aw=wt06], ll(0) ul(180) ; | |
eststo eveout: quietly tobit evewrknothome ib3.educ4##male agemc ageychild hh_numkids single work_hours [aw=wt06], ll(0) ul(180) ; | |
eststo evehome: quietly tobit evewrkhome ib3.educ4##male agemc ageychild hh_numkids single work_hours [aw=wt06], ll(0) ul(180) ; | |
#delimit; | |
estout eveall eveout evehome using "evework_tobits.txt", cells(b(star fmt(%9.3f)) se(par(`"="("' `")""'))) | |
keep(1.male 1.educ4 2.educ4 4.educ4 1.educ4#1.male | |
2.educ4#1.male 4.educ4#1.male agemc ageychild hh_numkids single work_hours _cons) | |
order(1.male 1.educ4 2.educ4 4.educ4 1.educ4#1.male | |
2.educ4#1.male 4.educ4#1.male agemc ageychild hh_numkids single work_hours _cons) | |
stats(N N_unc ll) replace; | |
/*--- Compare tobit, OLS and poisson-gamma for my eveall measure ---*/ | |
eststo eveallOLS: quietly regress evewrkall ib3.educ4##male agemc ageychild hh_numkids single work_hours [aw=wt06]; | |
eststo eveallPG: quietly glm evewrkall ib3.educ4##male agemc ageychild hh_numkids single work_hours [aw=wt06]; | |
#delimit; //Descriptive Tables Start Here | |
/*-- Table to show the number of workers on different shifts-- */ | |
tab shift [aw=wt06]; //Table of breakdown by shift classification | |
tab shift [aw=wt06] if evewrkall != 0; //Table of shift if evewrkall != 0 | |
tab shift [aw=wt06] if evewrkall == 0; //Table of shift if evewrkall == 0 | |
#delimit; | |
/*--- Table to show avg amount of eve work (6-9pm) done by workers on different shifts-- */ | |
table shift [aw=wt06], | |
contents(mean evewrkall ) ; //Table of avg minutes of eve work per shift | |
table shift _evewrkall [aw=wt06] , | |
contents(mean evewrkall ) ; //Avg minutes if total evewrk != 0 | |
table shift [aw=wt06], | |
contents(p20 evewrkall p40 evewrkall mean evewrkall p60 evewrkall p80 evewrkall ) ; //Table of avg minutes of eve work per shift | |
table shift _evewrkall [aw=wt06] , | |
contents(p20 evewrkall p40 evewrkall mean evewrkall p60 evewrkall p80 evewrkall ) ; //Avg minutes if total evewrk != 0 | |
#delimit; | |
/*--- Show Composition of eveining workers or shift workforces-- */ | |
* table shift [aw=wt06], contents (mean age mean educ4 mean hh_numkids mean single mean work_hours mean r1 mean r2 mean r3 mean r4 mean r5); | |
* table _evewrk [aw=wt06], contents (mean age mean educ4 mean hh_numkids mean single mean work_hours mean i.race4h); | |
regress evewrkall ib2.shift; //Regress to see how much of eve work is explained by shift, does it go away with other covariates? | |
regress evewrkall ib2.shift male agemc ib3.educ4 [aw=wt06]; //Regress to see how much of evening work is explained with covariates | |
mlogit shift male agemc ib3.educ4 hh_numkids single work_hours ib1.race4 [aw=wt06], b(2); //regresses same covariates on shift. | |
#delimit; | |
/*--- Show the descriptive means by shift/evening work---*/ | |
mean male age lths hs somecol college hh_numkids single work_hours r1 r2 r3 r4 r5 [aw=wt06] if shift == 1; | |
mean male age lths hs somecol college hh_numkids single work_hours r1 r2 r3 r4 r5 [aw=wt06] if shift == 2; | |
mean male age lths hs somecol college hh_numkids single work_hours r1 r2 r3 r4 r5 [aw=wt06] if shift == 3; | |
mean male age lths hs somecol college hh_numkids single work_hours r1 r2 r3 r4 r5 [aw=wt06] if evewrkall > 0; | |
mean male age lths hs somecol college hh_numkids single work_hours r1 r2 r3 r4 r5 [aw=wt06] if evewrkall == 0; | |
mean male age lths hs somecol college hh_numkids single work_hours r1 r2 r3 r4 r5 ; | |
#delimit; | |
/*----- Minutes of "day" or "evening" work by shift -----*/ | |
table shift, c(mean work8am4pm mean work4pm12am); | |
/* Hypothesis 4: Time in Childcare */ | |
summ evewrknothome if evewrknothome != 0, d ; //Only about 20% of sample does eve wrk away from home | |
summ evewrkhome if evewrkhome != 0, d; //Only about 10% of sample does eve wrk at home | |
corr evewrkhome evewrknothome; //Not correlated (duh); 109 cases are >0 for both | |
#delimit; | |
bysort male: tobit twkids_all ib3.educ4, ll(0) ul(1440); //regress time in childcare | |
bysort male: tobit twkids_all evewrkhome evewrknothome ib3.educ4, ll(0) ul(1440); //regress time in childcare | |
bysort male: tobit twkids_all evewrkhome evewrknothome ib3.educ4 agemc | |
ageychild hh_numkids single work_hours parttime | |
if year <=2009, ll(0) ul(1440); //Full Model: home eve work increases time (only for 2010/11) | |
bysort male: tobit twkids_all evewrkhome evewrknothome ib3.educ4 agemc | |
ageychild hh_numkids single work_hours parttime | |
if year >2009, ll(0) ul(1440); //Full Model: home eve work increases time (only for 2010/11) | |
#delimit; | |
bysort male: tobit twkids_6to9 ib3.educ4, ll(0) ul(1440); //regress time in childcare | |
bysort male: tobit twkids_6to9 evewrkhome evewrknothome ib3.educ4, ll(0) ul(180); //regress time in childcare | |
bysort male: tobit twkids_6to9 evewrkhome evewrknothome ib3.educ4 agemc | |
ageychild hh_numkids single work_hours parttime, ll(0) ul(180); //Full Model: | |
#delimit; | |
bysort male: tobit twkids_6to9 c.evewrkhome##ib3.educ4 c.evewrknothome##ib3.educ4 agemc | |
ageychild hh_numkids single work_hours parttime, ll(0) ul(180); //Full Model w. interactions, doesn't do much | |
#delimit; //Table 3, model 1 | |
tobit twkids_6to9 evewrkhome evewrknothome male agemc ageychild hh_numkids | |
single work25q work75q [aw=wt06] , ll(0) ul(180); //Reduced model 3.1 | |
mfx, predict(ys(0,180)) varlist(evewrkhome evewrknothome male agemc | |
ageychild hh_numkids single work25q work75q); //Table 3, model 1-- dy/dx for y*) | |
regress twkids_6to9 evewrkhome evewrknothome male agemc ageychild hh_numkids | |
single work25q work75q [aw=wt06]; //OLS model for a simple sanity check (appx 3.1) | |
#delimit; //Tabe 3, model 2 | |
tobit twkids_all evewrkhome evewrknothome male agemc ageychild hh_numkids | |
single work_hours [aw=wt06] , ll(0) ul(1440); //Reduced model | |
mfx, predict(ys(0,1440)) varlist(evewrkhome evewrknothome male agemc | |
ageychild hh_numkids single work_hours); //Table 3, model 2-- dy/dx for y*) | |
regress twkids_all evewrkhome evewrknothome male agemc ageychild hh_numkids | |
single work_hours [aw=wt06]; //OLS model for a simple sanity check (appx 4.2)\ | |
#delimit; | |
/*--- Strange, the effect of evening work at home is opposite what is expected. But...*/ | |
tobit twkids_all evewrkhome evewrknothome male agemc ageychild hh_numkids | |
single parttime [aw=wt06] , ll(0) ul(1440); //changing 3.2 to part time flips effect | |
*Need sensitivity test, since part-time flips effect. Put in Short, Reg (ref), and Long Hours | |
#delimit; | |
tobit twkids_all evewrkhome evewrknothome male agemc ageychild hh_numkids | |
single work25q work75q [aw=wt06] , ll(0) ul(1440); //Reduced model | |
mfx, predict(ys(0,1440)) varlist(evewrkhome evewrknothome male agemc | |
ageychild hh_numkids single work25q work75); //Table 3, model 2-- dy/dx for y*) | |
regress twkids_all evewrkhome evewrknothome male agemc ageychild hh_numkids | |
single work25q work75q [aw=wt06]; //OLS model for a simple sanity check (appx 3.2)\ | |
#delimit; //Table 3, model 3 --- Make to include time in work at home??? | |
#delimit; //Table 5, model 1 | |
tobit twkids_all evewrkhome evewrknothome male agemc ageychild hh_numkids | |
single work_hours ib3.educ4 [aw=wt06] , ll(0) ul(1440); //Model 5.1: WITH ED, to test odd eve work at home positive coef. | |
mfx, predict(ys(0,1440)) varlist(evewrkhome evewrknothome male agemc | |
ageychild hh_numkids single work_hours ib3.educ4); //Table 5, model 1, model 1-- dy/dx for y*) | |
regress twkids_all evewrkhome evewrknothome male agemc ageychild hh_numkids | |
single work_hours ib3.educ4 [aw=wt06]; //OLS model for a simple sanity check (appx 5.1) | |
#delimit; //Table 5, model 2 | |
tobit twkids_all evewrkhome evewrknothome male agemc ageychild hh_numkids | |
single work_hours ib3.educ4##c.evewrkhome ib3.educ4##c.evewrknothome | |
[aw=wt06] , ll(0) ul(1440); //Model 2: with ed AND INTS, to test odd eve work at home positive coef. | |
* mfx, predict(ys(0,1440)) varlist(evewrkhome evewrknothome male agemc | |
* ageychild hh_numkids single work_hours ib3.educ4##evewrkhome | |
* ib3.educ4##evewrknothome); //Table 5, model 2, -- dy/dx for y*) | |
regress twkids_all evewrkhome evewrknothome male agemc ageychild hh_numkids | |
single work_hours ib3.educ4##c.evewrkhome ib3.educ4##c.evewrknothome | |
[aw=wt06]; //OLS model for a simple sanity check (appx 5.2) | |
#delimit; | |
* save "/Users/michaelcorey/Dropbox/R Private/atus4rPars.dta", replace; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment