Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Accumulating results under -simulate-


From   Herb Smith <hsmith@pop.upenn.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Accumulating results under -simulate-
Date   Wed, 4 Oct 2006 09:37:51 -0400 (EDT)

I am -simulate-ing a routine that returns numerous parameters of (at least
potential) interest:  99 right now (11 coeffs x 9 aspects of estimated
sampling distributions...)

The example under -help simulate- is comparatively homely:  only two
parameters returned, as scalars, e.g.,

". simulate mean=r(mean) var=r(Var), reps(10000): lnsim, obs(100)"

(Both -mean- and -Var- are -return-ed as scalars in the program called
under -simulate-.)

Is there a more elegant way to do this?  For example, can I -return- to
-simulate- one (or more) matrixes?  If nothing else, this saves me a
statement with 99 iterations:

-b11=r(b11) b12=r(b12) ... b21=r(b21) ... b99=r(b99)

Merci par avance!

--Herb


Herbert L. Smith
Professor of Sociology and
Director, Population Studies Center
230 McNeil Building
3718 Locust Walk CR
University of Pennsylvania
Philadelphia, PA  19104-6298

hsmith@pop.upenn.edu

215.898.7768 (office)
215.898.2124 (fax)
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index