     Randpres.exe was written in Turbo Pascal Vers. 4. It is
designed to run in a DOS environment but seems to run fine under
Windows 3.1.  An icon file (randpres.ico) is included for this
purpose.  The program itself is quite crash-proof and does
extensive error checking (range, type etc.) on the values the user
inputs.  Throughout the program, the user is afforded the
opportunity to quit.  (See bottom right of screen when program is
running to determine how).  Although the above is true, USE THIS
PROGRAM AT YOUR OWN RISK!

     Randpres.exe is a program designed to facilitate RANDOM
PRESENTATIONS of a stimulus set WITHOUT REPLACEMENT and requires a
response of a real number after each presentation.  It allows for
up to 999 different stimuli and up to 100 repetitions of these
stimuli.  The user specifies the path and filename for the data.
If the file already exists, the program will warn you and allow
you to either open it anyway, rename your data file, or exit the
program.  Be aware that opening it anyway will erase its contents.
On completion of the program, the generated data file will consist
of 5 columns of data with 1 row for each response.  (# of rows = #
of stimuli X # of repetitions.  The columns represent:

   1 - Subject ID (a string of up to 16 user specified characters)
   2 - Presentation Order (the order in which the stimulus was
                             randomly picked by the program)
   3 - Repetition # (user defined [1...100]
   4 - Stimulus # (number of the presented stimulus])
   5 - Response (real number  [+ or - 99999.9999])
                    (written to 4 decimals)

An Example

     You wish to randomly present 16 different stimuli to 10
subjects, and you want each subject to be presented with these
stimuli 3 times.  The stimuli are to be presented in a new random
order for each of the three repetitions.  Consecutively number
your objects.  Where possible, use a logical progression - i.e.
smallest = 1 up to the largest = 16.  The 1st stimulus can
actually be assigned any integer in the range of 1 to 998 but the
others must be numbered consecutively after it.  Also, the last
stimulus number should not exceed 999.  Start Randpres.exe and
answer the prompts as follows:

        1st Stimulus? : 1
   How many Stimuli ? : 16
       How many Reps? : 3
          Subject ID? : Subj 01 (up to 16 characters of input)
   Name of Data File? : Subj01.dat

     The program will randomly present a Stimulus #. You present
the approp. stimulus to the subject and input the response.  It
must be a real number in the range of + or - 99999.9999.  (NOTE: A
RESPONSE OF -9999 EXITS THE PROGRAM).  The program will then
randomly present another Stimulus # and wait for the next response
(note that the program keeps you informed as to where you are in
terms of the # of stimuli presented in the current repetition and
the # of repetitions run through).  This continues until the
program presents all the stimuli #s for all the repetitions.  It
then prompts you to "Hit Any Key To Exit".  Exit the program and
you can now open subj01.dat with any text editor.  Repeat these
steps for subjects 2 - 10 but name the data files (e.g.
subj02.dat...subject10.dat) as appropriate.  The data files can be
joined with a DOS copy command or imported as is into a program
like EXCEL for data manipulation (sorting, changing rows to
columns, analysis, etc.).

     If, in the above example, you wanted to completely randomize
the presentations of the stimuli (i.e. collapsed across
repetitions) then assign 3 numbers to each stimulus (e.g. 1st
stimulus = 1, 2, 3 ... last stimulus = 46, 47, 48.  Start
Randpres.exe and answer the prompts as follows:

        1st Stimulus? : 1
   How many Stimuli ? : 48
       How many Reps? : 1
          Subject ID? : Subj 01
   Name of Data File? : Subj01.dat

     Present the 1st stimulus whenever Stimulus # 1, 2, or 3 is
presented and so on for the rest of the stimuli.  Repeat for the
other 9 subjects.


Helpful Hints:

     Remember, data files are precious.  ALWAYS, ALWAYS, ALWAYS,
back them up on a different disk from where they are initially
stored.  This will keep them safe from drive crashes, accidental
erasures, viruses etc..  This is experience talking.

     When naming both the data files and the subject ID keep the
number of characters the same across subjects or you may face some
sorting problems.  For instance, if you are running 10 - 99
subjects, call subject 1's data file subj01.dat and the ID subj 01
not subj1.dat and subj 1. Similarly, if > 99 subjects are run, use
subj001.dat & subj 001 respectively.


     When naming the data files it may be helpful to give them all
the same extension (i.e. .dat).  Also, you should ensure that
there are no other .dat files in the directory where these are
stored.  Then, all the files can be joined in one file (e.g.
alldata).  This is most easily accomplished if the new file has a
different extension (or none) than the individual files.  This
will not erase the original .dat files.  The DOS command is:

                     copy *.dat alldata

If the .dat extension is wanted on the new file use the DOS rename
command as follows:

                     ren alldata all.dat

The new file is now called all.dat.

It's not clear (to me at least) what order DOS will use when
joining the .dat files.  I suspect it copies the first .dat file
listed in the directory to alldata and then adds to the end of it
the 2nd .dat file listed etc..  If this is true, it might be worth
sorting the directory with Norton or some other utility program
prior to performing the above copy command.  With Norton, the
command DS EN should do the job.  In any event, if the alldata
file doesn't have the subject's ID in the approp. order you can
always sort it.  Sorting by Subject ID and Repetition # and
Presentation Order (columns 1 & 3 & 2) will put it in the same
arrangement as the original subj.dat files.
