Code Monkey home page Code Monkey logo

Comments (6)

ikosmidis avatar ikosmidis commented on June 3, 2024

Yes. For binomial-response models brglmFit with type = AS_mean produces the same estimates as brglm does. So, regardless of what you use the estimates should be finite. Can you send me a reproducible example?

from brglm2.

dasiav7 avatar dasiav7 commented on June 3, 2024

I use my data and cannot reproduce the situation again. I think the warning message occurred during the bootstrap steps. Let me try if it can be reproduced again.

from brglm2.

ikosmidis avatar ikosmidis commented on June 3, 2024

Hi Joy, please note that for some reason whenever you are writing all past discussion is posted too (perhaps you use you mail client?). So please use the GitHub interface for the discussion, as I would like to keep the issue discussion clean for the benefit of other users.

Having said that I cannot find the attached code and hence cannot replicate the issue.

Please repost.

from brglm2.

dasiav7 avatar dasiav7 commented on June 3, 2024

Dear Dr. Kosmidis,

I'm sorry. I did not know that when I write mail, it will be posted.

Attached are the data and code I used. I think the warning message "brglmFit: algorithm did not converge" came out during the bootstraps, By the way, I also used another package called "medflex" in my works.

test for brglm2.zip

from brglm2.

ikosmidis avatar ikosmidis commented on June 3, 2024

Hi Joy,

Thanks for the reproducible example!

neModel seems to be doing bootstrap by case resampling or a associated variant and your data set has covariates that are highly imbalanced. For example, the dummy corresponding toStage == "not reported" has 1002 zeros and 12 ones. So, the bootstrap datasets can end up having very few ones or only zeros with positive probability.

So, I think it is not brglmFit's fault. brglmFit now tries hard to find good starting values and fit the model despite the highly imbalanced datasets, and it actually does this very well and better than brglm and glm! It only fails in a handful of cases of the above kind, and both brglm::brglm.fit and glm.fit fail to converge on those and more cases.

Overall, I think neModel can be either given an option to ignore bootstrap samples where fitting has not been possible (returning a warning potentially), or use residual-resampling bootstrap if the methodology permits. But this is the call of neModel's developers. Perhaps you can ask them directly?

I hope that helps. Please let me know if you find any bugs with brglmFit.

All the best,

Ioannis

from brglm2.

dasiav7 avatar dasiav7 commented on June 3, 2024

Dear Dr. Kosmidis,
Thank you for your kind assistance and good advice!

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.