Statalist The Stata Listserver


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

Re: st: How to generate a variable out of an empty dataset?


From   [email protected]
To   [email protected]
Subject   Re: st: How to generate a variable out of an empty dataset?
Date   Thu, 20 Jul 2006 09:35:27 +0100

That's it. Thanks. 

set obs 1000
gen var = uniform()

will get me 1000 uniformly distributed variables from which I can create 
my binary variables. 

Thanks, 

Tim 




"Dimitriy V. Masterov" <[email protected]> 
Sent by: [email protected]
19/07/2006 18:08
Please respond to
[email protected]


To
[email protected]
cc

Subject
Re: st: How to generate a variable out of an empty dataset?






Could the problem be that you did not set the number of observations
for your empty data set? Try running "set obs 1000" before the
drawing.

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

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