Skip to content

Instantly share code, notes, and snippets.

@nozma
Created August 7, 2016 13:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nozma/aaa22ade4271e9851a1130a84b14fb7d to your computer and use it in GitHub Desktop.
Save nozma/aaa22ade4271e9851a1130a84b14fb7d to your computer and use it in GitHub Desktop.
カテゴリカルデータ解析第10章練習問題解答
# 1.
data("JointSports")
result <- ctree(opinion ~ year + grade + gender, data = JointSports,
weights = Freq)
plot(result)
# 2.
titan.d <- data.frame(Titanic)
head(titan.d)
result <- ctree(Survived ~ Class + Sex + Age, weights = Freq,
data = titan.d)
plot(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment