Description Usage Format Details Source References Examples
Passenger survival data from 1912 Titanic shipping accident.
1 |
A data frame with 1316 observations on the following 4 variables.
survived
1=survived; 0=died
age
1=adult; 0=child
sex
1=Male; 0=female
class
ticket class 1= 1st class; 2= second class; 3= third class
Titanic is saved as a data frame. Used to assess risk ratio; not stardard count model; good binary response model.
Found in many other texts
Hilbe, Joseph M (2007, 2011), Negative Binomial Regression, Cambridge University Press Hilbe, Joseph M (2009), Logistic Regression Models, Chapman & Hall/CRC
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | data(titanic)
glm.lr <- glm(survived ~ age + sex + factor(class),
family=binomial, data=titanic)
summary(glm.lr)
exp(coef(glm.lr))
glm.irls <- irls(survived ~ age + sex + factor(class),
family = "binomial",
link = "cloglog",
data = titanic)
summary(glm.irls)
exp(coef(glm.irls))
glm.ml <- ml_glm(survived ~ age + sex + factor(class),
family = "bernoulli",
link = "cloglog1",
data = titanic)
summary(glm.ml)
exp(coef(glm.ml))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.