You already get all four combinations of two categorical variables in your regression. You can see it as follows:
Here is the conclusion of your regression:
Call: glm(formula = cbind(Yes, No) ~ Priorconv + Crime + Priorconv:Crime, family = binomial, data = table1) Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 1.9062 0.3231 5.899 3.66e-09 *** PriorconvP -1.3582 0.3835 -3.542 0.000398 *** CrimeShoplifting 0.9842 0.6069 1.622 0.104863 PriorconvP:CrimeShoplifting -0.5513 0.7249 -0.761 0.446942
So, for Priorconv reference category (one that has a dummy value = 0) is N And for Crime reference category is Other . So, here, how to interpret the regression results for each of the four possibilities (where log (p / (1-p)) is the log of the coefficient of the Yes result):
1. PriorConv = N and Crime = Other. This is just the case where both dummies are zero, so your regression is just the intercept: log(p/(1-p)) = 1.90 2. PriorConv = P and Crime = Other. So the Priorconv dummy equals 1 and the Crime dummy is still zero: log(p/(1-p)) = 1.90 - 1.36 3. PriorConv = N and Crime = Shoplifting. So the Priorconv dummy is 0 and the Crime dummy is now 1: log(p/(1-p)) = 1.90 + 0.98 4. PriorConv = P and Crime = Shoplifting. Now both dummies are 1: log(p/(1-p)) = 1.90 - 1.36 + 0.98 - 0.55
You can change the order of the values ββof the coefficients of the two predictor variables, but it will just change which combinations of variables fall into each of the four cases above.
Update: Regarding the issue of regression coefficients regarding ordering factors. A change in the reference level will lead to a change in the coefficients, since the coefficients will be contrasts between different combinations of categories, but will not change the predicted probabilities of the Yes or No result. (Regression modeling would not be so reliable if you could change forecasts just by changing the reference category.) Note, for example, that the predicted probabilities are the same, even if we switch the reference category to Priorconv :
m1 = glm(cbind(Yes,No)~Priorconv+Crime+Priorconv:Crime,data=table1,family=binomial) predict(m1, type="response") 1 2 3 4 5 6 7 8 0.9473684 0.8705882 0.9473684 0.8705882 0.7272727 0.6336634 0.7272727 0.6336634 table2 = table1 table2$Priorconv = relevel(table2$Priorconv, ref = "P") m2 = glm(cbind(Yes,No)~Priorconv+Crime+Priorconv:Crime,data=table2,family=binomial) predict(m2, type="response") 1 2 3 4 5 6 7 8 0.9473684 0.8705882 0.9473684 0.8705882 0.7272727 0.6336634 0.7272727 0.6336634