R - Generalized linear model (glm)

Card Puncher Data Processing

Function

Statistics - Generalized Linear Models (GLM) - Extensions of the Linear Model

Function

glm

Binary Logistic Regression

Statistics - Binary logistic regression

glm with the argument family equals binomial in order to apply the logit transformation.

binaryLogisticModel <- glm(data$outcome ~ data$predictor1 + data$predictor2 + .... + data$predictorn, 
family = binomial)
summary(binaryLogisticModel )
Call:
glm(formula = data$outcome ~ data$predictor1 + data$predictor2 + data$predictor3, family = binomial)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-1.8413  -0.3307   0.1902   0.5212   1.6435  

Coefficients:
                   Estimate Std. Error z value Pr(>|z|)   
(Intercept)      -1.748e-02  3.571e+00  -0.005    0.996   
data$predictor1   3.721e-01  1.424e-01   2.612    0.009 **
data$predictor2  -1.373e+01  6.942e+00  -1.977    0.048 * 
data$predictor3  -7.554e-02  4.646e-01  -0.163    0.871 
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 34.372  on 26  degrees of freedom
Residual deviance: 18.068  on 22  degrees of freedom
AIC: 28.068

Number of Fisher Scoring iterations: 6

contingency tables or class tabs.







Share this page:
Follow us:
Task Runner