Git Product home page Git Product logo

Comments (3)

ikosmidis avatar ikosmidis commented on June 7, 2024

It looks like the primal test fail. The dual program works:

R> library(brglm2)
R> load("data2.rda")
R> form2 <- Histology ~ Cigarette + med1 * med2 * med3 * med4 + Age + Gender + Stage + Race
R> glm(form2, family = binomial("logit"), data = data2, method = "detect_separation", linear_program = "dual")
Separation: FALSE 
Existence of maximum likelihood estimates
          (Intercept) Cigarettenot reported          CigaretteYes 
                    0                     0                     0 
                 med1                  med2                  med3 
                    0                     0                     0 
                 med4               Age>=75              Age55-64 
                    0                     0                     0 
             Age65-74       Agenot reported            Gendermale 
                    0                     0                     0 
              StageII              StageIII               StageIV 
                    0                     0                     0 
    Stagenot reported                RaceNo      Racenot reported 
                    0                     0                     0 
            med1:med2             med1:med3             med2:med3 
                    0                     0                     0 
            med1:med4             med2:med4             med3:med4 
                    0                     0                     0 
       med1:med2:med3        med1:med2:med4        med1:med3:med4 
                    0                     0                     0 
       med2:med3:med4   med1:med2:med3:med4 
                    0                     0 
0: finite value, Inf: infinity, -Inf: -infinity

A post-fit check for infinite estimates agrees with the above. Specifically, there are no diverging standard errors across IWLS iterations, and hence no evidence for infinite maximum likelihood estimates

R> m_glm <- glm(form2, family = binomial("logit"), data = data2)
R> matplot(check_infinite_estimates(m_glm), type = "l", col = "black", lty = 1)

Does this help? Please re-open issue if not

from brglm2.

dasiav7 avatar dasiav7 commented on June 7, 2024

Dear Dr. ikosmidis,

Thank you! What's the difference between "primal" and "dual" in the program?

from brglm2.

ikosmidis avatar ikosmidis commented on June 7, 2024

See ?detect_separation_control and ?detect_separation. For details on the linear programs for detecting separation, pre-fit, see

Kjell Konis (2007). Linear Programming Algorithms for Detecting Separated Data in Binary Logistic Regression Models. DPhil. University of Oxford. <URL: https://ora.ox.ac.uk/objects/uuid:8f9ee0d0-d78e-4101-9ab4-f9cbceed2a2a>

from brglm2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.