outcome2factor function

Convert numeric ternary outcomes into a factor