Statalist


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

st: AW: random draw of single variable, not whole data


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: random draw of single variable, not whole data
Date   Thu, 26 Feb 2009 20:05:24 +0100

<> 


*************
clear*
input x
1
2
3
4
5
end
clonevar y=x
bsample 5
l
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Florian
Wakolbinger
Gesendet: Donnerstag, 26. Februar 2009 20:00
An: statalist@hsphsun2.harvard.edu
Betreff: st: random draw of single variable, not whole data

Dear all,

is it possible to randomly draw numbers out of a variable x and write it 
into another variable y

i.e. if

x
1
2
3
4
5

then y could be, for instance

y
3
5
3
2
4

all numbers in y are randomly drawn from x. how is it possible to 
construct such a variable y in stata?

thanks, and kind regards
florian

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


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index