R glm()


개요

R glm()
  • "Generalized Linear Model"
library("MASS")
str(menarche)
summary(glm(cbind(Menarche, Total-Menarche) ~ Age, family=binomial, data=menarche))
counts <- c(18,17,15,20,10,20,25,13,12)
outcome <- gl(3,1,9)
treatment <- gl(3,3)
z <- glm(counts ~ outcome + treatment, family = poisson())
summary(z)
anova(z)

같이 보기

참고