Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte NewNumVerifiers 15 0 38 20 20 20 3 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 23 15 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 38 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 15 15 15 0 0 0 0 0 0 0 0 0 0 0 0 end label values NewNumVerifiers NewNumVerifiers label def NewNumVerifiers 0 "None", modify label def NewNumVerifiers 3 "Bureau Veritas Certification", modify label def NewNumVerifiers 15 "ERM", modify label def NewNumVerifiers 20 "ISOS Group LLC", modify label def NewNumVerifiers 23 "Jane Nelson (Ms)", modify label def NewNumVerifiers 38 "Trucost", modify
I have the following two questions:
1. How can I recode the variable called NewNumVerifiers into two categories: 0 "None" (in the original variable) as the same in the new variable called AssuredOrNot, &, everything else (in the original variable) as 1 in the new variable called AssuredOrNot?
2. How can I recode the new variable called AssuredOrNot into two categories: 13 "Deloitte & Touche", 16 "Ernst & Young", 24 "KPMG LLP", 29 "Moss Adams LLP", 30 "PriceWaterhouseCoopers" (all in the variable called AssuredOrNot) as 1 in another new variable called AuditFirm, &, everything else (in the variable AssuredOrNot) as 0 in the new variable called AuditFirm?
3. What am I doing wrong with the following code?
Here is the code that I used:
recode NewNumVerifiers (0=0 "Not Assured") (*=1 "Assured"), gen(AssuredOrNot) label(Assured or Not)
I would be really grateful for your help! Thank you!
0 Response to RECODE help
Post a Comment