//only word file no excel /* Regression table in three formats 1. Full regression table 2. Nested regression table 3. Wide regression table */ sysuse auto.dta,clear Syntax: [bysort varname:] asdoc Stata_Commands, [Stata_command_options asdoc_options] ************************ *Full regression table * ************************ asdoc regress price mpg rep78 asdoc regress price mpg rep78 trunk asdoc summarize price mpg rep78 trunk //try noci option to surpress confidence interval asdoc regress price mpg rep78 trunk, noci *************************** *Nestted regression table * *************************** asdoc reg price mpg rep78, nested save(newfile) replace asdoc reg price mpg rep78 trunk, nested save(newfile) append //Decimal asdoc reg price mpg rep78, nested save(newfile) replace dec(2) asdoc reg price mpg rep78 trunk, nested save(newfile) append dec(2) //Column name asdoc reg price mpg rep78, nested save(newfile) replace dec(2) cnames(Model1) asdoc reg price mpg rep78 trunk, nested save(newfile) append dec(3) cnames(Model2) //cnames(\fs25 Model2) //title the table asdoc reg price mpg rep78, nested save(newfile) replace dec(2) cnames(Model1) title(Regression Analysis) asdoc reg price mpg rep78 trunk, nested save(newfile) append dec(3) cnames(Model2) //title(\) Use this option if you dont want the title at all. //Add t-value instead of standard errors in parenthesis. Can only be used with replace or reset option. asdoc reg price mpg rep78 trunk, nested save(newfile) dec(3) cnames(Model3) rep(t) replace //label option asdoc reg price mpg rep78 trunk, nested save(newfile) dec(3) cnames(Model3) rep(t) replace label //Add addtional row to regression table asdoc reg price mpg rep78 trunk, nested save(newfile) dec(3) cnames(Model3) rep(t) replace label add(Country dummies, yes, Year dummies, yes) //Additional Statistics asdoc reg price mpg rep78 trunk, nested replace save(newfile) dec(3) cnames(Model3) rep(t) replace label add(Country dummies, yes, Year dummies, yes) stat(r2_a, F) //Drop or Keep variables asdoc reg price mpg rep78 trunk, nested replace drop(mpg) //OR asdoc reg price mpg rep78 trunk, nested replace keep(rep78 trunk) //Changing font size and font style.Default is 10 and Garamond asdoc reg price mpg rep78 trunk, nested replace fs(12) font(Arial) //fhr() to format row headers, fhc() to format column headers, rtf controls