chapter 14 bonus document_rm

Upload: waqar-dar

Post on 02-Jun-2018

223 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 Chapter 14 Bonus Document_rm

    1/10

    Generating a random allocation sequence in SPSS

    In the following, we will show you how to generate a random allocation sequence in

    SPSS (for more information about random allocation sequences please see Chapter

    13 of the book! "s in the coin tossing e#ample in the book, we shall set up a random

    sequence for $% participants being allocated to two conditions! &he first thing you

    need to do is open a new SPSS data file! 'our system should look like this

    'ou then need to set up a new )ariable! It does not matter what you call it as we will

    not actually be using it anyway! *e ha)e called ours +1-

  • 8/10/2019 Chapter 14 Bonus Document_rm

    2/10

    *e need to let SPSS know how many random numbers we want generated and so

    we ha)e to set up the required number of rows in the data file! *e want $% numbers

    and so we need to set up $% rows (or +cases-! If you click on the Editmenu and then

    the Insert Casesoption

  • 8/10/2019 Chapter 14 Bonus Document_rm

    3/10

    'ou should notice that a full.stop +!- appears in the first row of the 1 )ariable! *e

    ha)e thus set up one case! *e want $% and so we can simply copy and paste this to

    the following 1/ rows in the 1 column to get the following

  • 8/10/2019 Chapter 14 Bonus Document_rm

    4/10

    *e now want to generate the random numbers! 'ou should click on the Transform,

    Computemenu items and you will be presented with the following dialog bo#! &ype in

    a new )ariable name into the Target Variablebo# (we ha)e named ours

    RandomNumber and then go to the bo# labelled Function Groupand scroll down

    until you see the Random Numbersoption and click on this

    'ou should notice that a range of entries appears in the Functions and Special

    Variablesbo# below it! &here are se)eral ways of generating random numbers! *e

    want to generate numbers that ha)e equal probabilities of being selected (a bit like

    tossing a coin where heads and tails ha)e equal probabilities of occurring and so we

    need to choose the RV.Uniformoption and then click on the arrow to the upper left of

    this bo#! 'ou will notice that the following is entered into the Numeric Expression bo#

    Select theRandomNumbersand

    then the0!niformoptions

  • 8/10/2019 Chapter 14 Bonus Document_rm

    5/10

    RV.UNIFR!"#$#%

    2otice the two question marks in the brackets! 'ou ha)e to type two numbers in

    place of the question marks! *hat this e#pression will do is create random numbers

    which fall between the two numbers that you place in the brackets! *e are going to

    generate random numbers between % and 1 and so these are the )alues that we will

    replace the questions marks with i!e!

    RV.UNIFR!"&$'%

    nce you ha)e done this, the dialog bo# should look like this

    Click on (and the random numbers will be generated

  • 8/10/2019 Chapter 14 Bonus Document_rm

    6/10

    'ou should be able to see that SPSS has generated random numbers between % and

    1 (to $ decimal places! *e can now use these numbers to generate our random

    allocation sequence! *e can say that if the number is below !4 then the participant is

    in the Inter)ention condition and if it is abo)e !4 then they are in the control condition!

    *e can get SPSS to work this out for us by using the Transform$ Recode into a

    different )ariableoption

  • 8/10/2019 Chapter 14 Bonus Document_rm

    7/10

    5ighlight the RandomNumber)ariable and mo)e it to the Input Variable *+ utput

    Variablebo#! &hen type a )ariable name (e!g! Condition into the Namesection of the

    utput Variable section and click on the C,angebutton! &he dialog bo# should look

    like this

    'ou then need to click on the ld and Ne- Valuesbutton! 'ou be presented with a

    new dialog bo#

  • 8/10/2019 Chapter 14 Bonus Document_rm

    8/10

    6irst of all, we are going to tell SPSS that all the )alues between % and %!4 should be

    coded as +1-! &o do this, click on the Range$ /EST t,roug, )alueoption and then

    type %!4 into the rele)ant bo#! &hen type a +1- into the Valuebo# in the Ne- Value

    section of the dialog bo#

    'ou should then click on the0ddbutton! 2e#t you want to tell SPSS to label the

    )alues from %!4 to 1 as condition +$-! Click on the Range$ )alue t,roug, 1IG1EST

  • 8/10/2019 Chapter 14 Bonus Document_rm

    9/10

    option and type %!4 into the bo# below it! &ype +$- into the Value boxand then click on

    the0ddbutton! &he dialog bo# should now look like this

    &his is set up fine now! Click on Continuefollowed by (! 'ou will see that a new

    )ariable is set up in your data file and this has the two conditions labelled as 1 or $

  • 8/10/2019 Chapter 14 Bonus Document_rm

    10/10

    &o make this more ob)ious you can set up the )alue labels in the Condition)ariable

    so that 1 7 Inter)ention and $ 7 Control and then click on the icon at the top of the

    screen that looks like a road sign! 'our data file will then look like this

    'ou can see from this that we would allocate the first two participants to the

    inter)ention condition and the ne#t two to the control condition and so on!