Dear Experts,
I have some data and I am confused how to enter in SPSS. I have one variable "A" and the possible readings of this variable can be Black, White, Pink, Black and White, Black and Pink, White and Pink. I am finding it difficult to enter Value for Labels in SPSS so as to have frequency distribution and other stats which take each reading into account. PS: I am using SPSS 20 on Win 8. Many thanks for your time and assistance. Kind Regards, |
Administrator
|
Several questions come to mind.
1. What exactly have you tried? (Show your syntax, if you used syntax.) 2. Is variable A a string variable, or numeric? 3. If numeric, what are the values that correspond to Black, White, etc? Suppose it is a numeric variable with values 1-6 for the labels you showed. You could run the following syntax to add the value labels. ADD VALUE LABELS A 1 "Black" 2 "White" 3 "Pink" 4 "Black and White" 5 "Black and Pink" 6 "White and Pink" . HTH.
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
Dear Admin,
Thank you for your prompt attention, much appreciated. Let me answer your question and then describe my problem in detail. 1. Not tried the syntax so far, but I thought of something similar to what you mentioned. 2. Variable A is string. 3. Values also not in numeric form. Now to the actual context. I belong to medical. My research is related to study if the blood has grown some bacteria or not? Variable A is actually name(s) of bacteria isolated from blood. Now I want to generate syntax whereby I can assign value labels of following bacteria. 1 "Acinetobacter" 2 "E. Coli" 3 "Klebsiella" 4 "P. Aeruginosa" 5 "B. Cepecia" 6 "Stentrophomonas Maltophilia" Its simple to enter if one of these bacteria is isolated. But how to enter the data if 2 or 3 of the bacteria are isolated, e.g. I cannot enter 1, 3 in the variable Data View. Looking for your response. Thanks and Regards, |
In reply to this post by mhdhammad
Usually when here are multiple responses, each option is entered as a separate dummy variable (white=0/1, Pink=0/1, Black=0/1) so you can get the individual frequencies.
Then the version you are interested in is calculated from those dummies. I believe there have been multiple examples of these calculations, but IF the ONLY options are as you indicate below (i.e. no Black, White AND Pink), you could just create a series of if/do if statements to calculate A=1 to 6 with the labels you give below. Melissa ________________________________________ From: SPSSX(r) Discussion [[hidden email]] On Behalf Of mhdhammad [[hidden email]] Sent: Monday, August 04, 2014 8:41 PM To: [hidden email] Subject: [SPSSX-L] Entering Multiple Readings of One Variable (value labels) Dear Experts, I have some data and I am confused how to enter in SPSS. I have one variable "A" and the possible readings of this variable can be Black, White, Pink, Black and White, Black and Pink, White and Pink. I am finding it difficult to enter Value for Labels in SPSS so as to have frequency distribution and other stats which take each reading into account. PS: I am using SPSS 20 on Win 8. Many thanks for your time and assistance. Kind Regards, -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Entering-Multiple-Readings-of-One-Variable-value-labels-tp5726884.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== 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 This correspondence contains proprietary information some or all of which may be legally privileged; it is for the intended recipient only. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this correspondence and completely dispose of the correspondence immediately. Please notify the sender if you have received this email in error. NOTE: Messages to or from the State of Connecticut domain may be subject to the Freedom of Information statutes and regulations. ===================== 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 |
* Maybe so?. COMPUTE bac1 = (CHAR.INDEX(A,"Acinetobacter") GT 0). COMPUTE bac2 = (CHAR.INDEX(A,"E. Coli") GT 0). COMPUTE bac3 = (CHAR.INDEX(A,"Klebsiella") GT 0). COMPUTE bac4 = (CHAR.INDEX(A,"P. Aeruginosa") GT 0). COMPUTE bac5 = (CHAR.INDEX(A,"B. Cepecia") GT 0). COMPUTE bac6 = (CHAR.INDEX(A,"Stentrophomonas Maltop") GT 0). MRSETS /MDGROUP NAME=$bacteria LABEL='Bacteria' CATEGORYLABELS=VARLABELS VARIABLES=bac1 bac2 bac3 bac4 bac5 bac6 VALUE=1 /DISPLAY NAME=[$bacteria]. CTABLES /VLABELS VARIABLES=$bacteria DISPLAY=BOTH /TABLE $bacteria [COUNT F40.0, COLPCT.COUNT PCT40.1] /CATEGORIES VARIABLES=$bacteria EMPTY=INCLUDE TOTAL=YES POSITION=BEFORE. *GL, Mario. "Ives, Melissa L" <[hidden email]> schrieb am 17:31 Dienstag, 5.August 2014: Usually when here are multiple responses, each option is entered as a separate dummy variable (white=0/1, Pink=0/1, Black=0/1) so you can get the individual frequencies. Then the version you are interested in is calculated from those dummies. I believe there have been multiple examples of these calculations, but IF the ONLY options are as you indicate below (i.e. no Black, White AND Pink), you could just create a series of if/do if statements to calculate A=1 to 6 with the labels you give below. Melissa ________________________________________ From: SPSSX(r) Discussion [[hidden email]] On Behalf Of mhdhammad [[hidden email]] Sent: Monday, August 04, 2014 8:41 PM To: [hidden email] Subject: [SPSSX-L] Entering Multiple Readings of One Variable (value labels) Dear Experts, I have some data and I am confused how to enter in SPSS. I have one variable "A" and the possible readings of this variable can be Black, White, Pink, Black and White, Black and Pink, White and Pink. I am finding it difficult to enter Value for Labels in SPSS so as to have frequency distribution and other stats which take each reading into account. PS: I am using SPSS 20 on Win 8. Many thanks for your time and assistance. Kind Regards, -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Entering-Multiple-Readings-of-One-Variable-value-labels-tp5726884.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== 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 This correspondence contains proprietary information some or all of which may be legally privileged; it is for the intended recipient only. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this correspondence and completely dispose of the correspondence immediately. Please notify the sender if you have received this email in error. NOTE: Messages to or from the State of Connecticut domain may be subject to the Freedom of Information statutes and regulations. ===================== 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
Mario Giesel
Munich, Germany |
In reply to this post by mhdhammad
Dear Mario Giesel and Ives, Melissa L,
Thank you for your time and help. I will try and get back with the result. Appreciate it. Thanks, Best Regards, |
Free forum by Nabble | Edit this page |