contr_code_treatment function

Treatment code a factor