Statalist


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

Re: st: Error handling in -simulate-


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Error handling in -simulate-
Date   Wed, 11 Jun 2008 17:15:17 +0100 (BST)

--- Rachel <academicgirl@gmail.com> wrote:
> Consider a -simulate- command that stipulates R repetitions. Suppose
> that the nth repetition of -simulate- produces an error.  Is there
> any way to make Stata simply run that repetition again?  If that's
> not possible, is there a way to make Stata continue on to the next
> repetition so that the the resulting dataset produces R-1
> observations (instead of the intended R)?

You can put a -capture- at strategic locations inside the program that
you are feeding -simulate-. You'll have to make sure that that will
lead that program to return a missing value for the statistics that
your are collecting.

-- Maarten


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      __________________________________________________________
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html
*
*   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