|
Hello.
I am hoping that somebody can point me to a website and/or relevant text for how to create a dataset in SPSS from contingency table information and not raw (case-level) data. The data consist of three binary variables: race (z, white or black), drug use (x, yes or no), symptoms (y, yes or no), and can be summarized as follows: SYMPTOMS RACE DRUG USE YES NO White Yes 14 107 White No 32 113 Black Yes 11 63 Black No 12 55 I want to impose a logistic regression model but I first need to figure out how to create this dataset in SPSS without having access to the raw (case-level) data. Thank you. nick myers ----------------------------------------------------------------------------------------------------------- Nicholas D. Myers, Ph.D. University of Miami School of Education Department of Educational and Psychological Studies Research, Measurement and Evaluation program Merrick Building 311E P.O. Box 248065 Coral Gables, FL 33124-2040 Tel: 305.284.9803 Fax: 305.284.3003 E-mail: [hidden email] http://www.education.miami.edu/facultyStaff/Faculty_Bio.asp?ID=143 ----------------------------------------------------------------------------------------------------------- ________________________________ ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
There are 3 categorical variables--race, drug use and symptom and cell
weight. There are 12 cells in table so you need to create 12 cases in the data editor or in a begin data--end data block that look like this: White Yes Yes 14 White Yes No 107 White No Yes 32 ... Where the 4 variables are Race, DrugUse, Symptom, and caseweight. Then, weight the file by the caseweight variable. Then do a quick check with CROSSTABS to make sure your table matches the source table. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Myers, Nicholas Sent: Tuesday, August 19, 2008 6:27 AM To: [hidden email] Subject: Contingency table versus raw data Hello. I am hoping that somebody can point me to a website and/or relevant text for how to create a dataset in SPSS from contingency table information and not raw (case-level) data. The data consist of three binary variables: race (z, white or black), drug use (x, yes or no), symptoms (y, yes or no), and can be summarized as follows: SYMPTOMS RACE DRUG USE YES NO White Yes 14 107 White No 32 113 Black Yes 11 63 Black No 12 55 I want to impose a logistic regression model but I first need to figure out how to create this dataset in SPSS without having access to the raw (case-level) data. Thank you. nick myers ---------------------------------------------------------------------------- ------------------------------- Nicholas D. Myers, Ph.D. University of Miami School of Education Department of Educational and Psychological Studies Research, Measurement and Evaluation program Merrick Building 311E P.O. Box 248065 Coral Gables, FL 33124-2040 Tel: 305.284.9803 Fax: 305.284.3003 E-mail: [hidden email] http://www.education.miami.edu/facultyStaff/Faculty_Bio.asp?ID=143 ---------------------------------------------------------------------------- ------------------------------- ________________________________ ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
In reply to this post by Myers, Nicholas
At 08:27 AM 8/19/2008, Myers, Nicholas wrote:
>[I want] to create a dataset in SPSS from contingency table information: > >The data consist of three binary variables: >race (z, white or black), >drug use (x, yes or no), >symptoms (y, yes or no), >and can be summarized as follows: > SYMPTOMS >RACE DRUG USE YES NO >White Yes 14 107 >White No 32 113 >Black Yes 11 63 >Black No 12 55 At 09:35 AM 8/19/2008, ViAnn Beadle wrote: >There are 12 cells in table so you need to create 12 cases in the >data editor or in a begin data--end data block that look like this: > >White Yes Yes 14 >White Yes No 107 >White No Yes 32 Exactly right, except that if the contingency table is in SPSS, you can use VARSTOCASES to get the data in the form she specifies, rather than hand-reentering: |-----------------------------|---------------------------| |Output Created |19-AUG-2008 22:24:10 | |-----------------------------|---------------------------| RACE DRUG_USE YES NO White Yes 14 107 White No 32 113 Black Yes 11 63 Black No 12 55 Number of cases read: 4 Number of cases listed: 4 VARSTOCASES /MAKE Instances FROM YES NO /INDEX = Symptoms(Instances) /KEEP = RACE DRUG_USE /NULL = KEEP. Variables to Cases |-----------------------------|---------------------------| |Output Created |19-AUG-2008 22:26:26 | |-----------------------------|---------------------------| Generated Variables |---------|------| |Name |Label | |---------|------| |Symptoms |<none>| |---------|------| |Instances|<none>| |---------|------| Processing Statistics |-------------|-| |Variables In |4| |-------------|-| |Variables Out|4| |-------------|-| LIST. List |-----------------------------|---------------------------| |Output Created |19-AUG-2008 22:26:26 | |-----------------------------|---------------------------| RACE DRUG_USE Symptoms Instances White Yes YES 14 White Yes NO 107 White No YES 32 White No NO 113 Black Yes YES 11 Black Yes NO 63 Black No YES 12 Black No NO 55 Number of cases read: 8 Number of cases listed: 8 ============================= APPENDIX: Test data, and code ============================= DATA LIST LIST/ RACE DRUG_USE YES NO (A5, A3, F4, F4). BEGIN DATA White Yes 14 107 White No 32 113 Black Yes 11 63 Black No 12 55 END DATA. LIST. VARSTOCASES /MAKE Instances FROM YES NO /INDEX = Symptoms(Instances) /KEEP = RACE DRUG_USE /NULL = KEEP. LIST. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
| Free forum by Nabble | Edit this page |
