Login or Register
Log in with
Forums
FAQ
Search in titles only
Search in General only
Advanced Search
Search
Home
Forums
Forums for Discussing Stata
General
You are not logged in. You can browse but not post. Login or
Register
by clicking 'Login or Register' at the top-right of this page. For more information on Statalist, see the
FAQ
.
Announcement
Collapse
No announcement yet.
X
Collapse
Posts
Latest Activity
Search
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Filtered by:
Clear All
new posts
Cyrus Muriithi
Join Date:
Jan 2016
Posts:
50
#1
Random Numbers without Replacement
25 Nov 2016, 02:21
How can i randomly generate random numbers between 1-84 without replacement.?
Kindly assist.
Nick Cox
Join Date:
Mar 2014
Posts:
35585
#2
25 Nov 2016, 02:25
Code:
set obs 84 set seed 2803 gen wanted = _n gen shuffle = runiform() sort shuffle
Now use the first # numbers of
wanted
as desired.
Comment
Post
Cancel
Cyrus Muriithi
Join Date:
Jan 2016
Posts:
50
#3
25 Nov 2016, 02:48
Thank you Nick
Comment
Post
Cancel
Previous
Next
Working...
Yes
No
OK
OK
Cancel
X
Comment