Bookmark and Share

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: bootstrap multiple equations?


From   "Tiago V. Pereira" <tiago.pereira@mbe.bio.br>
To   statalist@hsphsun2.harvard.edu
Subject   RE: st: bootstrap multiple equations?
Date   Wed, 18 Aug 2010 18:44:35 -0300 (BRT)

Austin, if you don't want to compare the different models, the most
straightforward way is to create a r(class) program that outputs directly
the coefficients.

Within the program, you can write the N different models as locals, and
loop over all possible models, outputting the results as a a scalar.

Say your program loops over 10 models and outputs  r(coef_1) ... r(coef_10).

You can create a single local


forvalues i = 1/10 {

		local coefs " `coefs' r(coef_`i')"

	}


dis "`coefs'"

and ask for the -bootstrap- to pick up all the returned coefficients with
this single local. Example:

 bootstrap `coefs', reps(1000) : yourpogram

Hope this helps.

Tiago







*
*   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/


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