posterior icon indicating copy to clipboard operation
posterior copied to clipboard

Add functions for PIT and LOO-PIT

Open TeemuSailynoja opened this issue 1 year ago • 6 comments
trafficstars

loo_pit is currently in rstantools but needs implementation for discrete variables, and should probably be moved to posterior. pit isn't currently available, but is used, for example, by bayesplot, where I have currently implemented the computation.

My questions are: 1 . PIT would require observations in addition to the draws object, which to my understanding isn't the case for other functions. Is this a problem? 2. Should there be a new subtitle on the functions page for PIT and LOO-PIT to fall under? 3. Should they be in the same function as regular PIT is just LOO-PIT with even weights?

TeemuSailynoja avatar Jan 19 '24 13:01 TeemuSailynoja

  1. I think it fits here. It's still generic so that there is no dependency on where the draws come from, and if pit function would support draws objects it would be natural here. Yesterday @paul-buerkner also agreed initially
  2. Makes sense
  3. Makes sense

avehtari avatar Jan 19 '24 14:01 avehtari

I think that PIT in posterior does make sense. Will we want to use it for other stuff than plotting though? If yes, than posterior is I think good. If we only ever want to use it for bayesplot, then perhaps also bayesplot could be a reasonable target(?)

paul-buerkner avatar Jan 19 '24 15:01 paul-buerkner

Just to clarify, are we talking about the methods or the generic (or both)?

paul-buerkner avatar Jan 19 '24 15:01 paul-buerkner

  • PIT values could be summarised with scalar diagnostic value, but the preferred way is graphics, but we may want to use other plots than what is available in bayesplot (which is what I was doing)
    1. methods, 2. it would be nice if the method function could be called with any posterior draws object type

avehtari avatar Jan 19 '24 16:01 avehtari

sounds like good arguments for posterior indeed.

Aki Vehtari @.***> schrieb am Fr., 19. Jan. 2024, 18:55:

  • PIT values could be summarised with scalar diagnostic value, but the preferred way is graphics, but we may want to use other plots than what is available in bayesplot (which is what I was doing)
    1. methods, 2. it would be nice if the method function could be called with any posterior draws object type

— Reply to this email directly, view it on GitHub https://github.com/stan-dev/posterior/issues/338#issuecomment-1900761992, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCW2ABIJ65MBMUIWRKAWHDYPKQP5AVCNFSM6AAAAABCB7SLJ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBQG43DCOJZGI . You are receiving this because you were mentioned.Message ID: @.***>

paul-buerkner avatar Jan 19 '24 16:01 paul-buerkner

Sounds good to me too

jgabry avatar Jan 22 '24 15:01 jgabry