How to handle being removed from a paper for (perhaps) unethical reasons?
The story you tell certainly leaves off a certain fragrance. The key question seems to be whether or not you have been replaced in order to get more "friendly" results. It is clear that it is possible to have an opinion about how data should be analysed and that opinions may deviate. It is also possible to interpret results differently. But, all within reason. If your analysis is sound and provides a certain outcome while a new analysis provides the basis for a different there can be either a matter of academic disagreement or that one or the other is flawed. I cannot judge this of course. 

Depending on which case you are facing the necessary, or possible, action would be to write a letter to the editor providing your analysis and view of the results to be published in the same journal, or to write the editor pointing at the error on the publication. In the latter, worse case, you of course need to be able to show without question that your view is correct and that the other is flawed (beyond just opinion). If the results are seriously flawed and may cause serious harm, the paper may even be retracted (see e.g. policy from Elsevier and examples from the New England Journal of Medicine).

So in short, the way forward depends on the seriousness of the flaw. An alternative option is of course to simply walk away and find better collaborators and more interesting vistas. But, if there are serious ethical problems you need to take action. Where you draw the line is not clear but usually a person with questionable behaviour has a history so you may be able to assess the over-all seriousness of the problem.