Coder Social home page Coder Social logo

Censored dnorm as prior about multibugs HOT 1 CLOSED

multibugs avatar multibugs commented on June 19, 2024
Censored dnorm as prior

from multibugs.

Comments (1)

rjbgoudie avatar rjbgoudie commented on June 19, 2024

Thanks for the report.

This is actually deliberate: MultiBUGS doesn't allow censoring of latent (i.e. unobserved) quantities, since censoring represents an observation e.g. you observed something to weigh more than 100kg, say. It is not obvious what "censoring" a latent quantity means.

The fix depends on whether T[i] is observed or not - i.e. is there data T[i]?

If T[i] is observed, all you need to do is change the first C(0, ) to T(0, ) - which means that T0 is now regarded as truncated rather than censored. Then you should get the same results as you get from OpenBUGS. This is because the normalising constant formed by truncation is a true constant here (it will be 0.5 in this case).

If T[i] is unobserved, it is unclear what the resolution is - it depends on what you are really trying to do. What OpenBUGS is doing in this case is strange and probably "wrong" - it just uses the Gaussian density function for the T[i], but rejects any value below 0. This is "wrong" because the implied "density" does not integrate to 1, as required for by the definition of a density. So while OpenBUGS is giving results, it not at all clear what the interpretation is. Instead, you could truncate T[i]. However note that truncation will add a normalising constant (so that the density integrates to 1), which will depend on T0. Also, if you truncate T[i] the prior mean of T[i] is NOT T0 - it will be higher than T0 since you have excluded all values less than zero. So you have to be careful with interpretation. Alternatively you could use an unrestricted prior and then use the abs() function make it positive before feeding into the model.

Hope that makes sense?

from multibugs.

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.