03-17-2014 03:41 PM
I have an interesting case where all values of -5 in my dataset should be set to missing. I don't want to have to do this for every variable separately, is there way to recode all instances of -5 in the dataset as missing or .S? Any help would be greatly appreciated. This came about from the way a QDS interview was programmed for skipped questions. Thank you in advance!
03-17-2014 04:35 PM
Do I have to assign the array for all of my variables? I am a little confused by your code, whar does the n_numeric refer to? I was able to get the code to run but it did not do anything to the -5. Thank you for your reply!
03-17-2014 05:05 PM
looks like just a typo in ballardw's suggestion.
It should be:
array n _numeric_ ;
n is the name of the array.
_numeric_ is a special name meaning "all numeric variables".
I think your initial thought to use .S intead of . also has merit.
Need further help from the community? Please ask a new question.