{smcl}
{* Mar2009}{...}
{cmd:help sum2}
{hline}
{title:Title}
{p2colset 5 13 22 2}{...}
{p2col :{hi: sum2} {hline 2}}Store summary statistics suitable for use with table-making{p_end}
{marker s_Syntax}
{title:Syntax}
{p 4 4 6}
{cmdab:sum2} [, {it:options}]
{marker s_Description}
{title:Description}
{p 4 4 6}
{cmd:sum2} provides a fast and easy way to store summary statistics for
use with standard table-making programs such as outreg, outreg2, estimates_table, xmltab, etc.
{p 4 4 6}
{cmd:sum2} was motivated in part by mfx2 and margeff that do the same thing
for marginal effcts.
{p 4 4 6}
{cmd:sum2} will only report for variables and observations used in
the last regression command. Therefore it will work only after a regression has run.
{p 4 4 6}
More specifically, {cmd:sum2} will store the mean in e(b) matrix and the cross-product
of the std. dev. in e(V) matrix.
{marker s_Options}
{title:Options}
{dlgtab:Main}
{p 4 12 6}{opt replace} the stored estimates is replaced with summary stats. This
is a reminder that you are getting rid of the previously stored estimates. {p_end}
{marker s_0}
{title:Examples}
{p 4 4 6}* use with outreg2{p_end}
{p 4 4 6}sysuse auto, clear{p_end}
{p 4 4 6}reg mpg headroom length rep78{p_end}
{p 4 4 6}outreg2 using myfile, replace{p_end}
{p 4 4 6}sum2, replace{p_end}
{p 4 4 6}outreg2 using myfile, see noaster{p_end}
{p 4 4 6}* use with original outreg{p_end}
{p 4 4 6}sysuse auto, clear{p_end}
{p 4 4 6}reg mpg headroom length rep78{p_end}
{p 4 4 6}sum2, replace{p_end}
{p 4 4 6}outreg using myfile.txt, replace nonote noaster{p_end}
{p 4 4 6}type myfile.txt{p_end}
{title:Issues}
{p 4 12 6}Matsize limitations may bite if there is a large number of variables.
Try increasing matsize in that case.{p_end}
{title:Author}
{p 4 4 6}Roy Wada{p_end}
{p 4 4 6}roywada@hotmail.com{p_end}