I am writing a syntax file to summarize some agreement rating variables.
however, when I receive the files I need to check the value labels to see how the variables are coded. Lets say that more often than not, '5' has a value label of "CA (5)" for Completely Agree so I know that the 5 point scale ranges from completely agree (5) to Completely disagree (1). Every so often, I get a file that is coded as completely agree (1) to Completely disagree (5). Again, the only way for me to tell how they are coded is by looking at the value labels. I was hoping to do a DO IF to recode the variables if the value label is "CA (1)" The probelm is that I cannot seem to find a way to read the value label through syntax in order to trigger the recode statement. If anyone has any idea how to do something like this, I would very much appreciate it. Thanks Egon Kraan Research Analyst TNS NFO 600 Vine Street, Suite 300 Cincinnati, Ohio 45202 Phone: (513) 345-6735 Fax: (513) 461-7989 Email: [hidden email] Web: www.tns-global.com ---------------------------------------------------------------------------- ------------ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. ---------------------------------------------------------------------------- ------------ |
There is a valuelabel function in the transformation system, so you can include that in conditional logic. It was introduced, I think, though I was wrong on the last guess, in SPSS 14.
You can't use it directly in RECODE syntax, but you can certainly use it in IF, DO IF ... -Jon Peck -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Egon Kraan Sent: Friday, January 12, 2007 3:19 PM To: [hidden email] Subject: [SPSSX-L] Recode based on Value Label I am writing a syntax file to summarize some agreement rating variables. however, when I receive the files I need to check the value labels to see how the variables are coded. Lets say that more often than not, '5' has a value label of "CA (5)" for Completely Agree so I know that the 5 point scale ranges from completely agree (5) to Completely disagree (1). Every so often, I get a file that is coded as completely agree (1) to Completely disagree (5). Again, the only way for me to tell how they are coded is by looking at the value labels. I was hoping to do a DO IF to recode the variables if the value label is "CA (1)" The probelm is that I cannot seem to find a way to read the value label through syntax in order to trigger the recode statement. If anyone has any idea how to do something like this, I would very much appreciate it. Thanks Egon Kraan Research Analyst TNS NFO 600 Vine Street, Suite 300 Cincinnati, Ohio 45202 Phone: (513) 345-6735 Fax: (513) 461-7989 Email: [hidden email] Web: www.tns-global.com ---------------------------------------------------------------------------- ------------ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. ---------------------------------------------------------------------------- ------------ |
Free forum by Nabble | Edit this page |