Hi folks,
I am interested in aggregating / collecting values from analyses in order to output them to a file. The motivation behind this is to keep the analysis process as much "hands off" as possible so as to avoid typing mistakes and be more efficient in producing results (i.e., not winnowing around a plain text file for a bunch of values and then retyping those into a document...).
As an example, I would like to run three hierarchical regressions, and save the marginal predicted value of SEX on the outcome variable TOTALSCORE.
I know I could start a log file and save all the output, but I would like to avoid having to retype by hand.
Note that this question is cross-listed on StackOverflow : here
Running :
Stata/SE 13.1 for Windows (64-bit x86-64)
Revision 19 Dec 2014
I am interested in aggregating / collecting values from analyses in order to output them to a file. The motivation behind this is to keep the analysis process as much "hands off" as possible so as to avoid typing mistakes and be more efficient in producing results (i.e., not winnowing around a plain text file for a bunch of values and then retyping those into a document...).
As an example, I would like to run three hierarchical regressions, and save the marginal predicted value of SEX on the outcome variable TOTALSCORE.
I know I could start a log file and save all the output, but I would like to avoid having to retype by hand.
Code:
use http://www.stata-press.com/data/r13/depression.dta , replace foreach v of varlist * { rename `v' `=lower("`v'")' } **** anova totalscore i.sex ereturn list , all return list , all estat esize return list, all margins i.sex, at( (mean) _c (asobserved) _f) return list , all matrix list r(b) anova totalscore i.sex i.race ereturn list , all estat esize margins i.sex, at( (mean) _c (asobserved) _f) matrix list r(b) anova totalscore i.sex i.race c.age ereturn list , all estat esize margins i.sex, at( (mean) _c (asobserved) _f) matrix list r(b) /* would ultimately like to produce something like this and save to a file : Model 0.sex 1.sex est_name model 1 57.237 57.840 anova totalscore i.sex model 2 57.243 57.825 anova totalscore i.sex i.race model 3 57.228 57.864 anova totalscore i.sex i.race c.age */
Note that this question is cross-listed on StackOverflow : here
Running :
Stata/SE 13.1 for Windows (64-bit x86-64)
Revision 19 Dec 2014
Comment