I think this should be a no-brainer but I'm not having any success.
I'm trying to restructure a data set with only 1 variable in it, a case id. Instead of 3780 records with different values of caseid, I want 1 record with the values of caseid going across. There would be 1 record with 3780 case id fields. I'm using restructure to flip this file (running 11.5.1). The result is that all the new variables are set to numeric and their values set to sysmis. I tried defining new vars as string but to no avail. What do I need to do to come up with 1 record with the different case numbers running across. Thanks. Sydelle Raffe, Alameda County Social Services Agency Information Services Division e:mail: [hidden email] phone: 510-271-9174 fax: 510-271-9107 If you have a request for information, please submit an ODM request form at: https://alamedasocialservices.org/staff/support_services/statistics_and_reports/odm/index.cfm |
Hi,
Try FLIP command. It is simpler than RESTRUCTURE, but should do what you want. On 26/09/06, Raffe, Sydelle, SSA <[hidden email]> wrote: > I think this should be a no-brainer but I'm not having any success. > > I'm trying to restructure a data set with only 1 variable in it, a case id. Instead of 3780 records with different values of caseid, I want 1 record with the values of caseid going across. There would be 1 record with 3780 case id fields. > > I'm using restructure to flip this file (running 11.5.1). The result is that all the new variables are set to numeric and their values set to sysmis. I tried defining new vars as string but to no avail. > > What do I need to do to come up with 1 record with the different case numbers running across. Thanks. > > Sydelle Raffe, Alameda County Social Services Agency > Information Services Division > e:mail: [hidden email] > phone: 510-271-9174 fax: 510-271-9107 > If you have a request for information, please submit an ODM request form at: https://alamedasocialservices.org/staff/support_services/statistics_and_reports/odm/index.cfm > -- Martins Liberts [hidden email] |
In reply to this post by Raffe, Sydelle, SSA
You need to recode the case id as a numeric before using flip
(Autorecode can be used if there are text characters). --jim -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Martins Liberts Sent: Tuesday, September 26, 2006 12:28 AM To: [hidden email] Subject: Re: restructuring data Hi, Try FLIP command. It is simpler than RESTRUCTURE, but should do what you want. On 26/09/06, Raffe, Sydelle, SSA <[hidden email]> wrote: > I think this should be a no-brainer but I'm not having any success. > > I'm trying to restructure a data set with only 1 variable in it, a case id. Instead of 3780 records with different values of caseid, I want 1 record with the values of caseid going across. There would be 1 record with 3780 case id fields. > > I'm using restructure to flip this file (running 11.5.1). The result is that all the new variables are set to numeric and their values set to sysmis. I tried defining new vars as string but to no avail. > > What do I need to do to come up with 1 record with the different case numbers running across. Thanks. > > Sydelle Raffe, Alameda County Social Services Agency Information > Services Division > e:mail: [hidden email] > phone: 510-271-9174 fax: 510-271-9107 > If you have a request for information, please submit an ODM request > form at: > https://alamedasocialservices.org/staff/support_services/statistics_an > d_reports/odm/index.cfm > -- Martins Liberts [hidden email] |
In reply to this post by Raffe, Sydelle, SSA
At 08:09 PM 9/25/2006, Raffe, Sydelle, SSA wrote:
>I'm trying to restructure a data set with only 1 variable, a case id. >Instead of 3780 records with different values of caseid, I want 1 >record with the values of caseid going across. There would be 1 record >with 3780 case id fields. I think CASESTOVARS is in 11.5. This is the simplest possible use of it. This is SPSS draft output. LIST. List |-----------------------------|---------------------------| |Output Created |26-SEP-2006 13:22:56 | |-----------------------------|---------------------------| CaseID Alpha Beta Gamma Delta Epsilon Eta Theta Number of cases read: 7 Number of cases listed: 7 CASESTOVARS. Cases to Variables Notes |--------------------------|---------------------------| |Output Created |26-SEP-2006 13:23:22 | |--------------------------|---------------------------| Generated Variables |---------|--------| |Original |Result | |Variabl |--------| |e |Name | |-------|-|--------| |CaseID |1|CaseID.1| | |-|--------| | |2|CaseID.2| | |-|--------| | |3|CaseID.3| | |-|--------| | |4|CaseID.4| | |-|--------| | |5|CaseID.5| | |-|--------| | |6|CaseID.6| | |-|--------| | |7|CaseID.7| |-------|-|--------| Processing Statistics |---------------|---| |Cases In |7 | |---------------|---| |Cases Out |1 | |---------------|---| |Cases In/Cases |7.0| |Out | | |---------------|---| |Variables In |1 | |---------------|---| |Variables Out |7 | |---------------|---| |Index Values |7 | |---------------|---| LIST. List |-----------------------------|---------------------------| |Output Created |26-SEP-2006 13:23:47 | |-----------------------------|---------------------------| The variables are listed in the following order: LINE 1: CaseID.1 CaseID.2 CaseID.3 CaseID.4 LINE 2: CaseID.5 CaseID.6 CaseID.7 CaseID.1: Alpha Beta Gamma Delta CaseID.5: Epsilon Eta Theta Number of cases read: 1 Number of cases listed: 1 |
Free forum by Nabble | Edit this page |