Hi all,
I am attempting to change 30-40 text/string values to numeric values for five variables. For example, one of the variables asks "how many people live in your household?". The vast majority of respondents entered "1" or "5", but a few responded "one" or "five". In this example, I'd like to replace the response "one" with "1".
I know that I can change these values using the replace command for individual cases, but as we have over 7000 respondents it'd be great if there's a quicker alternative. I've tried to use the recode command (e.g., recode [var] ("One"=1) and replace command (e.g., replace [var]=1 if [var]=="One") but haven't had any luck. Any help would be greatly appreciated.
Thank you!
Matt
I am attempting to change 30-40 text/string values to numeric values for five variables. For example, one of the variables asks "how many people live in your household?". The vast majority of respondents entered "1" or "5", but a few responded "one" or "five". In this example, I'd like to replace the response "one" with "1".
I know that I can change these values using the replace command for individual cases, but as we have over 7000 respondents it'd be great if there's a quicker alternative. I've tried to use the recode command (e.g., recode [var] ("One"=1) and replace command (e.g., replace [var]=1 if [var]=="One") but haven't had any luck. Any help would be greatly appreciated.
Thank you!
Matt
Comment