Coder Social home page Coder Social logo

Comments (9)

paul-buerkner avatar paul-buerkner commented on August 17, 2024 1

You can now try out the zero_inflated_beta family. :-)
I will think about how to implement zero-one-inflated families, but this requires some more work on formula syntax and related features, which takes some time.

from brms.

paul-buerkner avatar paul-buerkner commented on August 17, 2024

Currently, it is not possible, but I could manage to implement it relatively easy (just copy things from the other zero_inflated families). When you say you have some ones, you also need a "one_inflated" family, if you want to use beta, because beta is only defined on ]0,1[.
Of course this is also possible to implement but requires more time.

from brms.

alireza202 avatar alireza202 commented on August 17, 2024

I can definitely ignore the ones right now. There are not that many, and are of less importance. But zeros can't be neglected. It would be great to implement the zero-inflated beta distribution. I can do it myself, if it's relatively easy.

from brms.

paul-buerkner avatar paul-buerkner commented on August 17, 2024

I will try to do it tomorrow, it shouldn't take too long.

from brms.

alireza202 avatar alireza202 commented on August 17, 2024

Awesome!

from brms.

alireza202 avatar alireza202 commented on August 17, 2024

This is great! I think this might be enough for me.

from brms.

paul-buerkner avatar paul-buerkner commented on August 17, 2024

Ok, I am going to close this for now. A zero_one_inflated model is currently a bit far away from where I want brms to go. We would have to define 3 processes, one for the zero, one for the one, and the basic process in between. Thus, we would have to define 1 more internal variable, since main and spec are already in, referring to the main process and to the zero process (when using zero-inflated or hurdle models). I currently do not see another application of the 3rd variable outside of a zero_one_inflated_beta family. If we ever need this family or something similar, we can just reopen this issue or make a new one.

from brms.

liamkendall avatar liamkendall commented on August 17, 2024

Hi Paul,

I'm currently unable to fit a zero_one_inflated_beta model, with the attached data, despite the response being strictly between 0 and 1 (and including both). Any ideas why it is not working? Thanks!

data_example.txt

`
data_example <- read.csv("data_example.csv")

example_zob_model <- brm(d ~ PC1 + (1|Id),
data = data_example,
family = "zero_one_inflated_beta")`

Error: Family 'zero_one_inflated_beta' requires response smaller than or equal to 1.

from brms.

paul-buerkner avatar paul-buerkner commented on August 17, 2024

The example just works for me. Consider updating your brms. Perhaps that could help. If that doesn't help, I assume there is some numerical issue so consider using something like d <- ifelse(d > 1, 1, d)

from brms.

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.