|
Administrator
|
Please provide more information. E.g., what numbers should a, b, and c become? Are all 26 letters present? Do you have both upper and lower case?
Depending on the situation, AUTORECODE may be what you want. 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/). |
|
Laura As well as AUTORECODE you can substitue your own variable names in the following: From the SPSS data editor click on File > New > Syntax [opens a new syntax editor] Then write in the syntax editor: recode <v1> to <vn> (‘a’ = 1)(‘b’=2)(‘c’=3)(‘d’=4)(‘e’ = 5) into <newv1> to <newvn> . freq <newv1> to <newvn> . Click on Run > All If your variables are not contiguous in the file, you’ll have to specify them separately. It might also help to have a look at section 2.3 Data transformations on my website. Hope this helps. John F Hall (Mr) Email: [hidden email] Website: www.surveyresearch.weebly.com Skype: surveyresearcher1 Phone: (+33) (0) 2.33.45.91.47 From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of laura liu
|
In reply to this post by laura liu
You can simply click on transform on the data menu and you will be able to see a short list, click on automatic recode and a dialogue box will appear, click on the variables you want change into value and click on the arrow. Somewhere on the dialogue box you will see a rectangular box indicated new variable, inside that box, type your new variable name and click on add new name and the new variable will be displayed at the end of your SPSS data.
|
Administrator
|
In reply to this post by laura liu
Simplest thing would to do a global search/replace in Excel ;-)
In SPSS the following will suffice (or you could use RECODE or AUTORECODE as suggested by others): data list /s1 to s10 (10A1). BEGIN DATA abcdebaccd ebdcadebac accbacebdc abbbcabace END DATA. DO REPEAT S=S1 TO S10 / N=N1 TO N10. COMPUTE N=INDEX('abcde',S). END REPEAT. LIST. S1 S2 S3 S4 S5 S6 S7 S8 S9 S10 N1 N2 N3 N4 N5 N6 N7 N8 N9 N10 a b c d e b a c c d 1.00 2.00 3.00 4.00 5.00 2.00 1.00 3.00 3.00 4.00 e b d c a d e b a c 5.00 2.00 4.00 3.00 1.00 4.00 5.00 2.00 1.00 3.00 a c c b a c e b d c 1.00 3.00 3.00 2.00 1.00 3.00 5.00 2.00 4.00 3.00 a b b b c a b a c e 1.00 2.00 2.00 2.00 3.00 1.00 2.00 1.00 3.00 5.00 Number of cases read: 4 Number of cases listed: 4
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
I am out of the office until February 15. For immediate assistance please contact Jessica Jaramillo ([hidden email]). Thank you. |
Free forum by Nabble | Edit this page |