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

Re: st: Error handling in -simulate-

From   Maarten buis <>
Subject   Re: st: Error handling in -simulate-
Date   Wed, 11 Jun 2008 17:15:17 +0100 (BST)

--- Rachel <> 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

Sent from Yahoo! Mail.
A Smarter Email
*   For searches and help try:

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