Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.

# st: AW: saving regression results in matrix

 From "Martin Weiss" To Subject st: AW: saving regression results in matrix Date Tue, 13 Jul 2010 18:54:34 +0200

```<>

Also look at Roger`s

*************
ssc d parmest
*************

and Maarten`s http://www.stata-journal.com/article.html?article=st0137

HTH
Martin

-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Helge Liebert
Gesendet: Dienstag, 13. Juli 2010 18:11
An: statalist@hsphsun2.harvard.edu
Betreff: st: saving regression results in matrix

dear statalist,

im a student who started using stata a few months ago, so im far from
being fluent yet.

i have compiled a dataset and done various regressions, and i know the
specifications i want to present later.

as a further robustness check, i would like to run regressions using
specification.

i would like to save all results from these regressions so that i can
later look at histograms of coefficients, standard errors, pvalues and
the number of regressions the variables were included in. i have tried
to to this with macros, but then thought it might be best to save the
coefficients matrix, compute the standard errors and pvalues and save
these as a matrix as well. then, for each additional regression a row/
column would be added to the matrix. please let me know if this is way
off and there is a better way to do it.

so far i have used selectvars or tuples to create the combinations of
variables and loop over the regression (again, there is probably a
nicer way.)

selectvars x y z
xtnbreg some baseline vars `addvar' year_*, fe irr
mat b=e(b)
mat se= vecdiag(cholesky(diag(vecdiag(e(V)))))
mat pval = 2*(1-normprob(abs(coef/se))) /// how can i make this work?

}

i apologize if i'm completely mistaken at how to do this in a sensible
way, im just starting out. i thought this might be a nice
demonstration of robustness for my thesis.

thanks alot,

Helge
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```