I have heard conflicting advice on when to manipulate and recode variables. I was once told that you must impute on the most raw versions of variables and then recode (for example, turning a continous variable into categorical). I have taken this approach and am having convergence problems. However, my imputation and subsequent models work when I recode and then impute.

When I impure and then recode, my models are giving me error, saying there is variation between m = 1 and m = 2. Is there recommended guidelines here?