I conducted a study with three conditions (A, B, and C) and I want to test the difference between A and C. My default approach would be to run a t-test (or its equivalent) on a subset of the data (excluding the B condition), but another approach would be to contrast code the conditions (A = 1, B = 0, and C = -1) and run a linear model with the contrast-coded predictor. My understanding is that B would contribute to the estimate of the grand mean, and the error to be explained, but the mean for B wouldn't play a role in the reduction of error under the conditional model. My sense is that it's better to do this than to throw the data away in the analysis. I should also note that B is a control condition.
Is this okay to do?