When running a SAS program, you have to read the log. There are messages that you ignored about numeric to character conversion. What happens ...
You can't change a variable from being character to being numeric. Once it's character, it remains character. You can jump through the right hoops to get around that:
data subset;
set study;
if scarce = 'yes' then sc = 1;
if scarce = 'no' then sc = 0;
if purchase = 'yes' then pu = 1;
if purchase = 'no' then pu = 0;
drop scarce purchase;
rename sc = scarce pu = purchase;
run;
This program in effect gives you new numeric variables. You can then use DROP and RENAME to keep them under the original names, as numeric. This version of the data should work.