|
Post by Karel on Jun 4, 2016 18:28:31 GMT
So on p36 Abad writes:
logit(P(r=0|class, sex) = 2.11 - 1.5 *class - 2.85*Y
2 questions:
1. Why is sex in the logit and not in the formula? Is it a type and should it read "r=0|class,survival instead?"
2. How do you get the parameters? I tried as follows:
In R:
titanic.missing.age.log=glm(data=titanic.missing2, rage~class+survived, family=binomial(link="logit")) with rage=0 if age missing, 1 otherwise
Result:
Call: glm(formula = rage ~ class + survived, family = binomial(link = "logit"), data = titanic.missing2)
Deviance Residuals: Min 1Q Median 3Q Max -1.4101 -1.1311 0.9614 0.9614 1.6805
Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 0.53206 0.07365 7.224 5.03e-13 *** class -1.02300 0.14338 -7.135 9.69e-13 *** survived -0.64189 0.12611 -5.090 3.58e-07 ***
Which is rather far away from where he is with the parameters...
|
|
|
Post by Sebastiaan on Jun 4, 2016 19:09:52 GMT
According me, our pirate friend fucked up with the formula he used. It should indeed read r=0|class,survival instead
|
|