Skip to content

Instantly share code, notes, and snippets.

@nozma
Last active July 27, 2016 14:47
Show Gist options
  • Select an option

  • Save nozma/a6ce4ca4d01354d336c90454e1ae070d to your computer and use it in GitHub Desktop.

Select an option

Save nozma/a6ce4ca4d01354d336c90454e1ae070d to your computer and use it in GitHub Desktop.
カテゴリカルデータ解析第6章練習問題解答
# 練習問題
# 1.
Titan <- data.frame(Titanic)
res <- glm(Survived ~ Class + Sex + Age, weights = Freq,
family = binomial, data = Titan)
res
summary(res)
exp(res$coefficients)
mosaicplot(Titanic, color = TRUE)
# 2.
head(JointSports)
ordered(JointSports$opinion, levels = c("very bad", "bad", "indifferent"))
polr(opinion ~ year + grade + gender, weight = Freq, data = JointSports)
mosaicplot(xtabs(Freq ~ year + grade + gender + opinion, data = JointSports),
color = TRUE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment