Hi there,
I have a variable comprised of different codes, some of which are positively associated with my target variable and some are not. I’d like to reduce the dimensionality of the data by reducing the codes into two categories, one that is positively associated and one that is not. I have no idea how to write the code to do this, any ideas?
Thanks in advance,