Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: dataset generation


From   Nikolaos Pandis <[email protected]>
To   [email protected]
Subject   st: dataset generation
Date   Sun, 19 Apr 2009 09:28:50 -0700 (PDT)

Hi to all,

I would like to generate 4 variables that contain  a set of integers in a range from 40-100. 
I would like to select the range per variable.
The total number of observations per variable would be 100.
Finally, I would like to create a categorical variable with 0 or 1. 
The first 4 continuous variables, contain 50 values of category 0 and 50 of category 1:

id  var1  var2  var3 var4 var5cat

 1   45    43     44     46    0
 2   43    42     48     49    0
.............................
50   56     48    54     53    0

 51   45    43     44    46    0
 52   43    42      48   49    0
.............................
100   50     48    54     53   0

Thank you very much.

nick


      
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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