M1 <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing)
display (M1)
M2 <- bayespolr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing,
prior.scale=Inf, prior.df=Inf) # Same as M1
display (M2)
M3 <- bayespolr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing)
display (M3)
M4 <- bayespolr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing,
prior.scale=2.5, prior.df=1) # Same as M3
display (M4)
M5 <- bayespolr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing,
prior.scale=2.5, prior.df=7)
display (M5)
M6 <- bayespolr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing,
prior.scale=2.5, prior.df=Inf)
display (M6)
# Assign priors
M7 <- bayespolr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing,
prior.mean=rep(0,6), prior.scale=rep(2.5,6), prior.df=c(1,1,1,7,7,7),
prior.mean.for.cutpoints = rep(0,2),
prior.scale.for.cutpoints = rep(10,2), prior.df.for.cutpoints = c(1,7))
display (M7)
Run the code above in your browser using DataLab