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

Re: st: -using- option for program executed by -simulate-

From   [email protected] (Yulia Marchenko, StataCorp)
To   [email protected]
Subject   Re: st: -using- option for program executed by -simulate-
Date   Fri, 28 Dec 2007 15:53:10 -0600

Phil Schumm <[email protected]> asked about writing a command
to use with -simulate- that would accept -using- as part of its

> Often when performing simulations, it is helpful to start with an  
> existing dataset and then add to it, rather than having to create the  
> entire dataset from scratch at each iteration.  It would then seem  
> logical to pass the location of the saved dataset into one's program  
> via the -using- option.  However, for some reason, I can't seem to  
> get that to work (as demonstrated by this simple example):
> (example details omitted)
> . simul p = r(p), reps(100): foo group using `"`myfile'"', diff(1) sd(1)
> using not allowed
> r(101);

Phil correctly found that the error was being returned by
-_prefix_command- which is a utility routine called by -simulate-
and other prefix commands such as -bootstrap- and -jackknife-.

Austin Nichols <[email protected]> and Thomas Steichen
<[email protected]> show a workaround for this by specifying the
filename through an option:

We will look into adding the ability for commands used with the above
prefix commands to accept -using-; if that is not possible, we will
change the documentation to make it clear that it is not allowed.

[email protected]
*   For searches and help try:

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