Statalist


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

Re: st: bootstrap in stata 9 and stata 10


From   Michael McCulloch <[email protected]>
To   [email protected]
Subject   Re: st: bootstrap in stata 9 and stata 10
Date   Sun, 2 Mar 2008 16:30:00 -0800

Might the v9/v10 differences in _bootstrap_ lead to errors in bootstrap estimation if one is still using v9?




Carl Nelson <[email protected]> has a program that worked with -bootstrap- in
Stata 9 but is not working in Stata 10:

 I have an rclass function elasticity to use to bootstrap elasticities after
 estimation of a demand system. The bootstrap command that I use is:

 bootstrap (income: (etab1) (etab2) (etab3) (etab4)) (price1: (etab11)
 (etab12) (etab13) (etab14)) (price2: (etab21) (etab22) (etab23) (etab24))
 (price3: (etab31) (etab32) (etab33) (etab34)) (price4: (etab41) (etab42)
 (etab43) (etab44)), reps(150) seed(3782956): elasticity

 This command runs and reports bootstrap results in stata 9.

 In stata 10 the bootstrap iterations run then I get the error insufficient
 observations to compute bootstrap standard errors no results will be saved

 I searched through the bootstrap ado file and I could not find where this
 error is being generated. I also couldn't find any reference to this
 difference on the faq.

 What changed from 9 to 10, and what do I need to change to get results in
 stata 10?
In Stata 9, -bootstrap- failed to properly set -e(sample)- due to excessive
use of -preserve- and -restore-.  We fixed this in Stata 10.

The reason I bring this up is that prior to this bug fix, -bootstrap- would
tolerate the generation of non-temporary variables within the prefixed
command.  In Stata 10, prefixed commands that generate non-temporary variables
will cause -bootstrap- to post missing values in the replication loop because
the call that generates a non-temporary variable will cause the prefixed
command to exit with an error.

Carl should check his -elasticity- program to see if he is generating any
non-temporary variables.

If not, Carl can run -bootstrap- with the -noisily- option to see what error
message his -elasticity- command is producing.  Using -reps(2)- will cut down
on the output.

Carl can write to technical support <[email protected]> with a log of the
output to help track down what is causing the error.

--Jeff
[email protected]
*
*   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/
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index