model.matrixBayes is adapted from model.matrix in the stats
pacakge and is designed for the use of bayesglm.
It is designed to keep baseline levels of all categorical varaibles and keep the
variable names unodered in the output. The design matrices created by
model.matrixBayes are unidentifiable using classical regression methods,
though; they can be identified using bayesglm.
References
Andrew Gelman, Aleks Jakulin, Maria Grazia Pittau and Yu-Sung Su. (2009).
“A Weakly Informative Default Prior Distribution For
Logistic And Other Regression Models.”
The Annals of Applied Statistics 2 (4): 1360--1383.
https://sites.stat.columbia.edu/gelman/research/published/priors11.pdf