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   Timothy.Mak@iop.kcl.ac.uk
To   statalist@hsphsun2.harvard.edu
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" <dvmaster@gmail.com> 
Sent by: owner-statalist@hsphsun2.harvard.edu
19/07/2006 18:08
Please respond to
statalist@hsphsun2.harvard.edu


To
statalist@hsphsun2.harvard.edu
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index