Statalist


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

Re: st: Simple Question - Use of rndbin


From   "David M. Drukker" <[email protected]>
To   [email protected]
Subject   Re: st: Simple Question - Use of rndbin
Date   Sun, 23 Sep 2007 03:27:46 -0500 (CDT)

Dear Dann,

I am in Rome and on a borrowed computer.  I willbe in touch soon.

Best,
David
x
On Thu, 20 Sep 2007, [email protected] wrote:

Dear Statalisters,

I am writing a do file that uses -rndbin- to generate a second variable,
xb. As you all know -rndbin- runs as:

rndbin obs prob numb

However, the do file repeats that task X times and, in some cases, _n is
greater than obs. Hence, for examaple, the following error shows up:

obs must be between 32 and 582539
r(198);

Indeed, in one out of X runs of the loop, the local `observations' assumes
value of 19. The problem is that _n=32 in the dataset.

Thence,

rndbin 19 0.05 1

obs must be between 32 and 582539
r(198);

So, I would like to know if there is a way to solve this problem... say...
run -rndbin- in a way that the variable xb is not created.

Thank you again for your time and help.

Tiago






*
*   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/

--
---------------------------------------------------------------------------
 David M. Drukker, Ph.D.
 Director of Econometrics             VOICE: 1-979-696-4600
 StataCorp                            TOLL : 1-800-STATAPC (1-800-782-8272)
 4905 Lakeway Drive                   FAX  : 1-979-696-4601
 College Station, TX 77845            EMAIL: [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/



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