
Last chance! 50% off unlimited learning
Sale ends in
bayesglm
.contr.bayes.unordered(n, base = 1, contrasts = TRUE)
contr.bayes.ordered (n, scores = 1:n, contrasts = TRUE)
contrasts
is FALSE
.contr.treatment
and contr.poly
in stats
package. The purpose for these functions are to keep
the baseline levels of categorical variables and thus to suit the use of
bayesglm
.
contr.bayes.unordered
is equivalent to contr.treatment
whereas
contr.bayes.ordered
is equivalent to contr.poly
.C
,
contr.helmert
,
contr.poly
,
contr.sum
,
contr.treatment
;
glm
,
aov
,
lm
,
bayesglm
.cat.var <- rep(1:3, 5)
dim(contr.bayes.unordered(cat.var))
# 15*15 baseline level kept!
dim(contr.treatment(cat.var))
# 15*14
Run the code above in your browser using DataLab