Date: Mon, 13 Nov 2006 10:28:50 -0500
Reply-To: "Miriam L. Gerver" <mgerver@gmail.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Miriam L. Gerver" <mgerver@gmail.com>
Subject: Re: restructuring data to change unique identifier
In-Reply-To: <7.0.1.0.2.20061109164235.0470cdc8@mindspring.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Thank you, Richard. The syntax you sent worked perfectly! Yes, I
didn't realize that I could leave "department" unselected. And yes, I
selected the indicator variable option (for no rational reason).
Miriam
On 11/9/06, Richard Ristow <wrristow@mindspring.com> wrote:
> Postscript:
>
> At 11:06 AM 11/9/2006, Miriam L. Gerver wrote:
>
> >I ended up with an indicator variable for each department, rather than
> >a variable for the first department associated with a particular email
> >address and a second department associated with that particular email
> >address, etc. So it gave me about 30,000 indicator variables!
>
> I think I see how you did that. In the restructuring wizard, you
> . Panel 1: Selected "Restructure selected cases into variables",
> correctly
> . Panel 2:
> - Selected E-mail address as Identifier variable (correctly)
> + Selected Department as an index variable. THAT'S what's wrong, but
> it's an easy mistake to make: you know you want to do *something* with
> "Department", and those look like the only two choices. (In fact, you
> want to leave "Department" unselected from either category, at this
> point.)
> . Panel 3: (Sort the data or not, is OK)
> . Panel 4: Checked "Create indicator variables", which is the second
> problem.
>
> That generates the following:
>
> SORT CASES BY E_mail Dept .
> CASESTOVARS
> /ID = E_mail
> /INDEX = Dept
> /GROUPBY = VARIABLE
> /VIND ROOT = ind.
>
> And that gives you what you saw. This is SPSS draft output:
>
> LIST.
> |-----------------------------|---------------------------|
> |Output Created |09-NOV-2006 16:55:44 |
> |-----------------------------|---------------------------|
> Dept E_mail
>
> 1 abc@abc
> 2 abc@abc
> 3 abc@def
> 4 abc@def
> 5 abc@ghi
> 6 abc@jkl
>
> Number of cases read: 6 Number of cases listed: 6
>
>
> SORT CASES BY E_mail Dept .
> CASESTOVARS
> /ID = E_mail
> /INDEX = Dept
> /GROUPBY = VARIABLE
> /VIND ROOT = ind.
>
>
> Cases to Variables
> |--------------------------|---------------------------|
> |Output Created |09-NOV-2006 16:55:44 |
> |--------------------------|---------------------------|
>
> Generated Variables
> |---------|----|------|
> |Original |Dept|Result|
> |Variable | |------|
> | | |Name |
> |---------|----|------|
> |Indicator|1 |ind1 |
> | |----|------|
> | |2 |ind2 |
> | |----|------|
> | |3 |ind3 |
> | |----|------|
> | |4 |ind4 |
> | |----|------|
> | |5 |ind5 |
> | |----|------|
> | |6 |ind6 |
> |---------|----|------|
>
> Processing Statistics
> |---------------|---|
> |Cases In |6 |
> |---------------|---|
> |Cases Out |4 |
> |---------------|---|
> |Cases In/Cases |1.5|
> |Out | |
> |---------------|---|
> |Variables In |2 |
> |---------------|---|
> |Variables Out |7 |
> |---------------|---|
> |Index Values |6 |
> |---------------|---|
>
>
> LIST.
> |-----------------------------|---------------------------|
> |Output Created |09-NOV-2006 16:55:44 |
> |-----------------------------|---------------------------|
> E_mail ind1 ind2 ind3 ind4 ind5 ind6
>
> abc@abc 1 1 0 0 0 0
> abc@def 0 0 1 1 0 0
> abc@ghi 0 0 0 0 1 0
> abc@jkl 0 0 0 0 0 1
>
> Number of cases read: 4 Number of cases listed: 4
>
>
|