|Date: ||Mon, 27 Sep 2010 11:57:10 -0700|
|Reply-To: ||Justin Carroll <email@example.com>|
|Sender: ||"SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>|
|From: ||Justin Carroll <firstname.lastname@example.org>|
|Subject: ||Re: generating random (not consecutive) identification numbers|
As a brief followup as well:
1. I've never had any problems with random.org (for the last 7 years I have
used it), but I always harbor a sense of cynicism regarding allowing someone
else to do my work. As such, I would recommend running frequencies /JUST/
to double check to make sure there are no duplicate cases (again, I've NEVER
had a problem, but I always make sure). Of course, frequencies may not be
appropriate and/or a good detection technique if you have millions+ of
cases; if that is the case there are a number of alternatives I can think of
on checking to make sure no duplicate cases exists (all Python driven,
2. I just checked on Random.org, and see that you can create to 1 billion
cases (2 billion if you use negative numbers, but then you have repeating
numbers with only the sign being different). Additionally, I did not see an
"export" feature on the sequence generator, so you'll have to copy/paste
and/or save the html and parse the data out (if you wanted to use a 3rd
party language to parse the data I would recommend "select all" and
copy/paste the formatted text into a flat file (.txt or w/e works best for
you), this avoids having to 'fish out' all the HTML that is sure to be laden
Glad to hear this solution, albeit not SPSS driven, was amicable to your
situation; I'll withhold from the followup with Python/SPSS solutions then,
unless otherwise requested, seeing as the problem was solved!
J. R. Carroll
Grad. Student in Pre-Doc Psychology at CSUS
Research Assistant for Just About Everyone.
Email: email@example.com -or- firstname.lastname@example.org
Phone: (916) 628-4204
On Mon, Sep 27, 2010 at 11:47 AM, Debbie Hahs-Vaughn <email@example.com>wrote:
> This sounds perfect. Quick and easy works for me!! Thanks for the quick
> response and helpful information!
> Debbie Hahs-Vaughn, Ph.D.
> Associate Professor, Educational Research
> College of Education
> University of Central Florida
> 4000 Central Florida Blvd.
> 222M Education Complex
> PO Box 161250
> Orlando, FL 32816-1250
> Phone: 407-823-1762
> Fax: 407-823-4880
> Email: firstname.lastname@example.org
> My webpage: http://pegasus.cc.ucf.edu/~dhahszva/<http://pegasus.cc.ucf.edu/%7Edhahszva/>
> >>> Justin Carroll <email@example.com> 9/27/2010 2:19 PM >>>
> I'll respond with some Python (and maybe pure sytanx ways) a bit later
> (assuming I remember!!), but I often direct my students to use Random.org.
> This website uses "atmospheric static" to generate seemingly random numbers
> (it uses static in addition to some choice algorithms which plays on the
> age-old argument if true-randomization even exists). As such, there are
> some options via this website (random.org) which allow you create upwards
> millions of cases (or so I think I remember seeing) of consecutive random
> numbers (aka non repeating numbers). You can also specific the range so if
> you a 6 digit random non repeating ID, you can select 100,000-999,999, and
> it'll give a list of random non-repeating numbers. Furthermore, I believe
> there is an export option (if not copy and paste often works well enough
> smaller generations).
> This is quick, dirty, and I think just as good as using any randomization
> techniques that SPSS or Python can derive.
> In writing this, I can see a process in which you generate the $casenum, as
> you've done in the past, and use a random algorithm in SPSS (pure syntax)
> select from the available cases you already generated (thus picking from
> set of numbers at random, and reordering them based on their ordinal
> selection: aka the first case selected might be 642,324 which goes at the
> top of the column). Interesting thought! I'll play around with it
> tonight/tomorrow (hopefully!) and get back to you if one of the listers
> doesn't respond with a more cogent response.
> Check out random.org though (specifically http://www.random.org/sequences/
> I don't see why this couldn't work in your situation as a quick solution
> (specifics of your situation notwithstanding).
> J. R. Carroll
> Grad. Student in Pre-Doc Psychology at CSUS
> Research Assistant for Just About Everyone.
> Email: firstname.lastname@example.org -or- email@example.com
> Phone: (916) 628-4204
> On Mon, Sep 27, 2010 at 11:04 AM, Debbie Hahs-Vaughn <firstname.lastname@example.org
> > I have used COMPUTE ID=$CASENUM to generate consecutive identification
> > numbers. However how can I generate identification numbers that are not
> > consecutive but just purely random? I am trying to avoid having numbers
> > that are only one digit difference in the ID so that there is less room
> > error in what we are trying to do. Thanks!
> > =====================
> > To manage your subscription to SPSSX-L, send a message to
> > LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
> > command. To leave the list, send the command
> > SIGNOFF SPSSX-L
> > For a list of commands to manage subscriptions, send the command
> > INFO REFCARD