Thursday, October 15, 2009

SPSS: create random binary variable

To create a random binary variable called e.g. new_var one can use the following code:COMPUTE new_var=RND(RV.UNIFORM(0,1)).
EXECUTE.
or