Date: Thu, 2 Sep 1999 14:36:55 +0100
Reply-To: Jeremy Miles <j.n.v.miles@DERBY.AC.UK>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Jeremy Miles <j.n.v.miles@DERBY.AC.UK>
Subject: Re: converting nominal variables in dummy variables
In-Reply-To: <AD68A88F6858D2118F4700A0C9A333A94BE322@cbc_ex2.connex.ro>
Content-Type: text/plain; charset="us-ascii"
At 16:04 02/09/99 +0300, Sorin Sion wrote:
>Hi list!
>
>Is there any way to convert a nominal variable with say 10 possible values,
>in a range of 10 dummy variables, other than by hand?
>
> Sorin SION
>
That depends on what you mean by "by hand"
The followign syntax will do it fairly quickly and easily (there is
probably a quicker way, but this does the trick.)
RECODE catvar (1=1) (MISSING=SYSMIS) (ELSE=0) INTO dum1.
RECODE catvar (2=1) (MISSING=SYSMIS) (ELSE=0) INTO dum2.
etc . . .
JM
=====================================================================
Jeremy Miles j.n.v.miles@derby.ac.uk
Phone: 01332 622222 x3138 Fax: 01332 622287 Mobile: 07971 218172
Inst. of Behavioural Sciences, Derby University, Derby, DE22 3HL,UK
================ http://ibs.derby.ac.uk/~jeremym ====================
|