capture log close log using "SOCY699C-HW4-REGRESS-ADJUST.txt", text replace /* esttab example */ quietly eststo: regress sexfrq year c.age##c.age quietly eststo: regress sexfrq year c.age##c.age i.sex i.race educ childs esttab eststo clear #delimit ; esttab, title(Sexual Frequency Models) nonumbers mtitles("Model A" "Model B") coeflabels(age Age educ "Education (years)" childs "# of children" _cons "Constant") addnote("Source: General Social Survey") b(a3) p(4) r2(2) varwidth(17); #delimit cr eststo clear /* estout example--writing to the screen */ #delimit ; estout, title(Table 1. Sexual Frequency Models) mlabels("Baseline" "Full") note("Source: General Social Survey, 1972-2006") cells(b(star fmt(%8.4f) label(Coef)) se(par fmt(%8.4f))) stats(r2 N, fmt(3 %7.0fc) labels(R-squared "N of cases")) label legend varlabels(_cons Constant year "Survey Year" age Age agesqr Age-squared sex "Sex (0=M/1=F)" race "Race (0=W/1=B)" educ "Years of Education" childs "# of children"); #delimit cr eststo clear /* estout example--writing to a file */ quietly eststo: regress sexfrq year c.age##c.age quietly eststo: regress sexfrq year c.age##c.age i.sex i.race educ childs #delimit ; estout using sexfreq.txt, replace type title(Table 1. Sexual Frequency Models) mlabels("Baseline" "Full") note("Source: General Social Survey, 1972-2006") cells(b(star fmt(%8.4f) label(Coef)) se(par fmt(%8.4f))) stats(r2 N, fmt(3 %7.0fc) labels(R-squared "N of cases")) label legend varlabels(_cons Constant year "Survey Year" age Age sex "Sex (0=M/1=F)" race "Race (0=W/1=B)" educ "Years of Education" childs "# of children"); #delimit cr eststo clear /* esttab problems */ quietly eststo: regress sociability i.sex i.race age educ year quietly eststo: regress sociability i.sex i.race age educ year i.marital quietly eststo: regress sociability i.sex i.race age educ year i.marital attend1 reliten1 esttab estout eststo clear /* estout problems */ quietly eststo: regress sociability year i.sex i.race age educ quietly eststo: regress sociability year i.sex i.race age educ i.marital quietly eststo: regress sociability year i.sex i.race age educ i.marital attend1 reliten1 #delimit ; estout, title(Table 1. Sociability Models) mlabels("Demographics" "Marital" "Religion") note("Source: General Social Survey, 1972-2006") cells(b(star fmt(%8.4f) label(Coef)) se(par fmt(%8.4f))) stats(r2 N, fmt(3 %7.0fc) labels(R-squared "N of cases")) label legend varlabels(_cons Constant year "Survey Year" sex "Sex (0=M/1=F)" age Age 2.race black 3.race other educ "Years of Education" 2.marital Widowed 3.marital Divorced 4.marital Separated 5.marital "Not Married" attend1 "Religious Attendance" reliten1 "Religious Intensity"); #delimit cr #delimit ; estout using sociability.txt, replace title(Table 1. Sociability Models) mlabels("Demographics" "Marital" "Religion") note("Source: General Social Survey, 1972-2006") cells(b(star fmt(%8.4f) label(Coef)) se(par fmt(%8.4f))) stats(r2 N, fmt(3 %7.0fc) labels(R-squared "N of cases")) label legend varlabels(_cons Constant year "Survey Year" sex "Sex (0=M/1=F)" age Age 2.race black 3.race other educ "Years of Education" 2.marital Widowed 3.marital Divorced 4.marital Separated 5.marital "Not Married" attend1 "Religious Attendance" reliten1 "Religious Intensity"); #delimit cr eststo clear log close