(→개요) |
(→개요) |
||
4번째 줄: | 4번째 줄: | ||
<source lang='r' run> | <source lang='r' run> | ||
options(echo = TRUE) | |||
options(contrasts = c("contr.treatment", "contr.poly")) | options(contrasts = c("contr.treatment", "contr.poly")) | ||
house.plr <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing) | house.plr <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing) |
2020년 4월 12일 (일) 17:54 판
1 개요
- R polr()
- "Ordered Logistic Or Probit Regression"
R
Copy
options(echo = TRUE)
options(contrasts = c("contr.treatment", "contr.poly"))
house.plr <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing)
house.plr
summary(house.plr, digits = 3)
## slightly worse fit from
summary(update(house.plr, method = "probit", Hess = TRUE), digits = 3)
## although it is not really appropriate, can fit
summary(update(house.plr, method = "loglog", Hess = TRUE), digits = 3)
summary(update(house.plr, method = "cloglog", Hess = TRUE), digits = 3)
predict(house.plr, housing, type = "p")
addterm(house.plr, ~.^2, test = "Chisq")
house.plr2 <- stepAIC(house.plr, ~.^2)
house.plr2$anova
anova(house.plr, house.plr2)
house.plr <- update(house.plr, Hess=TRUE)
pr <- profile(house.plr)
confint(pr)
plot(pr)
pairs(pr)
Loading
2 같이 보기
3 참고
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.