Please help, I have a database that has the results to an assessment done on each of our juveniles. There are about 400 questions, but since some questions have check all that apply the number of cases per juvenile varies. I would like
to convert the rows to a single variable. For example: QuestionID = 13 _ Alcohol/Drug Assessment Results (they can have multiple answers). So I would like a new variable with a title Alcohol Dependent and then maybe a “1” listed if they chose this answer, and so on for each answer option. N/A (responseID=79) Alcohol Dependent (responseID=73) Substance Dependent (responseID=74) Alcohol Abuse (responseID=75) Substance Abuse (responseID=76) QuestionID = 197 Number of Suspensions I would like a new variable title Suspension indicating what their response was. 0 (responseID=1593) 1-2 (responseID=1594) 3 or more (responseID=1595) ID CAFPADATE StatusID QuestionID ResponseID Subresponse IntValue 25865 01/08/2012 2 364 2490 2490 1 25865 01/08/2012 2 13 73 73 1 25865 01/08/2012 2 13 74 74 1 25865 01/08/2012 2 197 1593 1593 1 25865 01/08/2012 2 13 75 75 25865 01/08/2012 2 14 81 Current_N 1 25865 01/08/2012 2 14 81 History_Y 1 30006 08/01/2012 2 13 73 73
30006 08/01/2012 2 197 1593 1593 1 30006 08/01/2012 2 13 74 74 1 30006 08/01/2012 2 13 75 75 1 30006 08/01/2012 2 13 76 76 1 30006 08/01/2012 2 13 77 77
30006 08/01/2012 2 14 81 Current_N 1 30006 08/01/2012 2 14 81 History_Y 1 30006 08/01/2012 2 14 82 Current_N 1 30006 08/01/2012 2 14 82 History_Y 1 30006 08/01/2012 2 14 83 Current_N 1
I hope this makes sense. I’m sure any suggestions would help me out. Stella Vasquez, Planner Research & Development 1624 W Adams, Phoenix, AZ 85007 602-542-2272 **The information contained in this communication is privileged and confidential and is intended solely for the individual[s] and/or entities named herein. This information is not to be disseminated. If you have received this message in error, please reply to the sender and notify the sender of the error and then permanently delete the message and sent item. Thank you.** |
Stella, I think I understand what you want. What I think we need is a sample of the incoming datafile. The examples you give are understandable to you but not at all to me. I assume that the table you have at the bottom of the message is how you’d like the restructured file to look. Show us what that file looks like coming in. As best you can, make up some example data that illustrates the issues (and then explain the issues) involved in the restructure. Gene Maguin From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Stella Vasquez Please help, I have a database that has the results to an assessment done on each of our juveniles. There are about 400 questions, but since some questions have check all that apply the number of cases per juvenile varies. I would like to convert the rows to a single variable. For example: QuestionID = 13 _ Alcohol/Drug Assessment Results (they can have multiple answers). So I would like a new variable with a title Alcohol Dependent and then maybe a “1” listed if they chose this answer, and so on for each answer option. N/A (responseID=79) Alcohol Dependent (responseID=73) Substance Dependent (responseID=74) Alcohol Abuse (responseID=75) Substance Abuse (responseID=76) QuestionID = 197 Number of Suspensions I would like a new variable title Suspension indicating what their response was. 0 (responseID=1593) 1-2 (responseID=1594) 3 or more (responseID=1595) ID CAFPADATE StatusID QuestionID ResponseID Subresponse IntValue 25865 01/08/2012 2 364 2490 2490 1 25865 01/08/2012 2 13 73 73 1 25865 01/08/2012 2 13 74 74 1 25865 01/08/2012 2 197 1593 1593 1 25865 01/08/2012 2 13 75 75 25865 01/08/2012 2 14 81 Current_N 1 25865 01/08/2012 2 14 81 History_Y 1 30006 08/01/2012 2 13 73 73 30006 08/01/2012 2 197 1593 1593 1 30006 08/01/2012 2 13 74 74 1 30006 08/01/2012 2 13 75 75 1 30006 08/01/2012 2 13 76 76 1 30006 08/01/2012 2 13 77 77 30006 08/01/2012 2 14 81 Current_N 1 30006 08/01/2012 2 14 81 History_Y 1 30006 08/01/2012 2 14 82 Current_N 1 30006 08/01/2012 2 14 82 History_Y 1 30006 08/01/2012 2 14 83 Current_N 1 I hope this makes sense. I’m sure any suggestions would help me out. Stella Vasquez, Planner Research & Development 1624 W Adams, Phoenix, AZ 85007 602-542-2272 **The information contained in this communication is privileged and confidential and is intended solely for the individual[s] and/or entities named herein. This information is not to be disseminated. If you have received this message in error, please reply to the sender and notify the sender of the error and then permanently delete the message and sent item. Thank you.** |
In reply to this post by Stella Vasquez
Dear Stella,
I think it is "the cases to variables" you are looking for. There is a lot of info on various sites on this, plz google it. hth Adel On Mon, Dec 10, 2012 at 5:27 PM, Stella Vasquez <[hidden email]> wrote:
Adel Daoud, PhD Department of Sociology and Work Science, University of Gothenburg Box 720 405 30 Göteborg, SWEDEN Visiting address: Sprängkullsgatan 25, room K109 +46 031-786 41 73 [hidden email] |
In reply to this post by Stella Vasquez
A basic answer if you want to use the menus is to use Data/Restructure. You want to restructure selected cases into variables. This may be enough to get you going. On Mon, Dec 10, 2012 at 10:27 AM, Stella Vasquez <[hidden email]> wrote:
This e-mail transmission and any attachments accompanying it may contain confidential and/or proprietary information and is intended only for the person or entity to whom it was originally addressed. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or other use of this information is strictly prohibited. Any unauthorized interception of this transmission is illegal. If you have received this transmission in error, please notify the sender by reply e-mail, and then destroy all copies of this transmission
|
Free forum by Nabble | Edit this page |