> table(res$'感染症病床あり', predict(model, type="response") > 0.5)
FALSE TRUE
FALSE 1369 88
TRUE 208 308
> DescTools::PseudoR2(model)
McFadden
0.3909515
> summary(model)
Call:
glm(formula = "感染症病床あり~.", family = binomial(link = "logit"),
data = res)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.4261 -0.5110 -0.3026 0.1483 2.7020
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -2.7179268 0.6108956 -4.449 8.62e-06 ***
`「感染症」`TRUE 3.2725807 0.3918867 8.351 < 2e-16 ***
`「災害」`TRUE 1.2214461 0.1444995 8.453 < 2e-16 ***
医業収支比率 0.0357892 0.0080102 4.468 7.90e-06 ***
病床利用率 -0.0374583 0.0067892 -5.517 3.44e-08 ***
有形固定資産減価償却率 -0.0276250 0.0043132 -6.405 1.51e-10 ***
病床100床あたり医師 -0.0793090 0.0167093 -4.746 2.07e-06 ***
病床100床あたり看護部門 0.0165883 0.0052390 3.166 0.00154 **
職員数 0.0028548 0.0002346 12.168 < 2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 2267.6 on 1972 degrees of freedom
Residual deviance: 1381.1 on 1964 degrees of freedom
AIC: 1399.1
Number of Fisher Scoring iterations: 5
Update: Oct 17, 2020
(hideki_shibutani)