Does Quasi Separation matter in R binomial GLM?

前端 未结 1 488
一向
一向 2021-01-27 15:33

I am learning how the quasi-separation affects R binomial GLM. And I start to think that it does not matter in some circumstance.

In my understanding, we say th

相关标签:
1条回答
  • 2021-01-27 16:02

    You have constructed an interesting example but you are not testing a model that actually examines the situation that you are describing as quasi-separation. When you say: "when x1=1 and x2=1 (obs 3) the data always fails.", you are implying the need for an interaction term in the model. Notice that this produces a "more interesting" result:

    > summary(glm(cbind(fail,nofail)~x1*x2,data=data,family=binomial))
    
    Call:
    glm(formula = cbind(fail, nofail) ~ x1 * x2, family = binomial, 
        data = data)
    
    Deviance Residuals: 
    [1]  0  0  0  0
    
    Coefficients:
                  Estimate Std. Error z value Pr(>|z|)
    (Intercept) -1.367e-17  1.414e-01   0.000        1
    x1           2.675e-17  2.000e-01   0.000        1
    x2           2.965e-17  2.000e-01   0.000        1
    x1:x2        2.731e+01  5.169e+04   0.001        1
    
    (Dispersion parameter for binomial family taken to be 1)
    
        Null deviance: 1.2429e+02  on 3  degrees of freedom
    Residual deviance: 2.7538e-10  on 0  degrees of freedom
    AIC: 25.257
    
    Number of Fisher Scoring iterations: 22
    

    One generally needs to be very suspect of beta coefficients of 2.731e+01: The implicit odds ratio i:

     > exp(2.731e+01)
    [1] 725407933166
    

    In this working environment there really is no material difference between Inf and 725,407,933,166.

    0 讨论(0)
提交回复
热议问题