• script.R
1
2
3
4
5
6
7
8
9
10
11
12
13
# attach the `AER` package
# encode `Class` as a factor
# fit the linear probability model, assign it to
`surv_mod`
# obtain a robust summary of the model coefficients
# predict the probability of survival for all passenger
classes
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • R Console
>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX