stepAIC function in MASS pkg vs jamovi: different results
Posted: Sun Jun 21, 2020 10:30 am
I used the stepAIC function in the package MASS to do binomial logistic regression on a dataset and the final model derived had an AIC of 57.8. When I tried to replicate the model in jamovi, the AIC was 131. Why the different results? jamovi results attached. Thanks
MASS pkg results:
Call:
glm(formula = phototherapy ~ compatibility + DAT_results + peak_bili,
family = binomial, data = szAIC)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.80278 -0.28119 -0.16732 -0.07112 2.52543
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -8.1175 1.8056 -4.496 6.93e-06 ***
compatibility -1.7169 1.0480 -1.638 0.1014
DAT_results 1.9487 0.9220 2.114 0.0345 *
peak_bili 0.6969 0.1646 4.235 2.29e-05 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 94.419 on 135 degrees of freedom
Residual deviance: 49.809 on 132 degrees of freedom
AIC: 57.809
Number of Fisher Scoring iterations: 7
MASS pkg results:
Call:
glm(formula = phototherapy ~ compatibility + DAT_results + peak_bili,
family = binomial, data = szAIC)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.80278 -0.28119 -0.16732 -0.07112 2.52543
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -8.1175 1.8056 -4.496 6.93e-06 ***
compatibility -1.7169 1.0480 -1.638 0.1014
DAT_results 1.9487 0.9220 2.114 0.0345 *
peak_bili 0.6969 0.1646 4.235 2.29e-05 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 94.419 on 135 degrees of freedom
Residual deviance: 49.809 on 132 degrees of freedom
AIC: 57.809
Number of Fisher Scoring iterations: 7