Changing the reference level in a regression factor from A to B does not change the statistical model, fitted probabilities, likelihood, or deviance. If the first parametrization isthen the second isNumerically,
The A-versus-B test is the same test as the former B-versus-A test, with its sign reversed, so its p-value remains . The malignancy coefficient is unchanged in this additive model, so its p-value remains . The intercept now represents site B rather than site A, so its test changes.
The
siteC coefficient also changes meaning: in fit1 it tests C versus A, whereas in fit2 it tests C versus B. Its standard error and p-value therefore need not agree. The displayed tables show that C versus A is not significant (), while C versus B is significant (). There is no contradiction: these are different pairwise hypotheses.Solved by gpt-5.6-sol high.
Codex Wiki