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

From |
jpitblado@stata.com (Jeff Pitblado, Stata Corp.) |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Handling ologit convergence failure in bstrap |

Date |
Thu, 19 Jun 2003 10:20:18 -0500 |

Mike Lacy <Michael.Lacy@colostate.edu> asks about convergence problems in -ologit- when bootstrapping its estimation results: > I am doing some bootstrapping experiments using OLOGIT . I have > deliberately chosen a skewed response variable (P = 0.1, 0.1, 0.1, 0.1, > 0.1, 0.6) and 6 covariates. The covariates are all scaled to the same > order of magnitude. Perhaps not surprisingly, at relatively smaller sample > sizes, (e.g., N = 100) , OLOGIT occasionally (say 1/100 reps) fails to > converge at any reasonable tolerance setting, and halts BSTRAP. It would be > nice if I could prevent this by tweaking the estimation process, but it > seems that the tolerance is the only thing I can change on the maximization > routine underlying OLOGIT. I presume but don't know that the routine is > simply reacting to a really degengerate distribution on the response > variable because leaving out some of the covariates doesn't seem to help. > If anyone has ideas for promoting convergence, that would be good, but I'm > not hopeful. > Presuming the convergence problem is intractable: > I would like to find a way for BSTRAP to continue, simply ignore the > occasional failure to converge, and to accumulate the results from the > reps that do converge. Is there a way this can be done? It appears that Mike is using Stata 7 or earlier, based on his comment that -bstrap- stops when -ologit- fails to converge. If Mike is using Stata 7, I would suggest using the -bs- command; it will post missing values if -ologit- stops with an error. Besides that, it has a better syntax and doesn't require the user to write a program. For example, suppose I wanted to bootstrap the coefficients from an -ologit- fit, then my do-file would look something like the following: . version 7 . use auto, clear /* assuming auto.dta is in the current dir */ . set seed 1234 . bs "ologit rep mpg weight" "_b[mpg] _b[weight]", reps(100) In Stata 8, -bs- and -bstrap- are synonyms for the new -bootstrap- command. -bootstrap- has an even more flexible syntax (similar to the -jknife- command) along with other new options. In Stata 8, my do-file would look like: . version 8 . sysuse auto, clear . set seed 1234 . bs "ologit rep mpg weight" _b, reps(100) Where by -_b-, -bootstrap- (and thus -bs-) understand that to mean all the elements of the coefficient vector -e(b)-. If Mike is performing intermediate calculations after the -ologit- fit, he can modify the program he wrote for the (Stata 7) -bstrap- command so that it returns the results in -r()- (that is, Mike can turn his program into an -rclass-). Then he can refer to these results in the list of statistics for the -bs- command. Suppose I have a program called -mycalc-, and -mycalc- places its result in -r(answer)-. Then my do-file for bootstrapping the results of -mycalc- would look something like . version 7 . use auto, clear . set seed 1234 . bs "mycalc rep mpg weight" "r(answer)", reps(100) or something similar for Stata 8. For more information on -rclass- programs, see [P] return. Also see [R] bstrap in the Stata 7 manual set, [R] bootstrap in the Stata 8 manual set. --Jeff jpitblado@stata.com * * 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/

- Prev by Date:
**st: histogram title** - Next by Date:
**Re: st: RE: [sampling in Cox model]** - Previous by thread:
**st: Handling ologit convergence failure in bstrap** - Next by thread:
**st: Re:** - Index(es):

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