PIT histograms for count data

752 views
Skip to first unread message

Henrik N.

unread,
Apr 18, 2014, 6:34:47 AM4/18/14
to r-inla-disc...@googlegroups.com
Dear R-INLA list,

I have a question regarding the use of PIT histograms in INLA for a poisson/neg.bin model for count data.


Czaado et al. (Predictive Model Assessment for Count Data - 2009), suggests a non-randomized method of representing PIT histograms for count data by defining means over aggregated conditional CDFs involving the CDF P_x (given observed count x) and P_(x-1) as well as a threshold u (defined by number of bins in the histogram).

Schrödle et al. (Using integrated nested Laplace approximations for the evaluation of veterinary surveillance data from Switzerland: A case-study - 2011) and Held et al. (Posterior and cross-validatory predictive checks: A comparison of MCMC and INLA - 2010), both mention the use of adjusted PIT histograms (à la Czado) in their work (also dealing with count data). What I could not deduce, is exactly how these adjustments were conducted, if any.

I know that r-inla compute the cross-validated PIT/CPO values, and if plotted for a discrete distribution, uses PIT - 0.5 * CPO (analogue to the posterior predictive mid-p-value).
My question is simply: Is the straight forward use of the cross-validated PITs from r-inla in histograms in accordance to Czado?


Best Regards,
Henrik

Havard Rue

unread,
Apr 19, 2014, 8:01:19 AM4/19/14
to Henrik N., r-inla-disc...@googlegroups.com
Schrodle uses the corrected one,as you describe. There is currently no way to do it as described in czaado++. I need to check details to answer if it's doable or not, if adding some more code.....
--
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion...@googlegroups.com.
To post to this group, send email to r-inla-disc...@googlegroups.com.
Visit this group at http://groups.google.com/group/r-inla-discussion-group.
For more options, visit https://groups.google.com/d/optout.


--
--
Håvard Rue
R-INLA

Henrik N.

unread,
Apr 21, 2014, 6:35:56 AM4/21/14
to r-inla-disc...@googlegroups.com
Thank you Håvard for your fast reply! I will keep an eye open for changes that will allow for the Czado adaption.

Best Regards,
Henrik

kl. 14:01:19 UTC+2 lørdag 19. april 2014 skrev Havard Rue følgende:
Schrodle uses the corrected one,as you describe. There is currently no way to do it as described in czaado++. I need to check details to answer if it's doable or not, if adding some more code.....


On Friday, April 18, 2014, Henrik N. <henri...@gmail.com> wrote:
Dear R-INLA list,

I have a question regarding the use of PIT histograms in INLA for a poisson/neg.bin model for count data.


Czaado et al. (Predictive Model Assessment for Count Data - 2009), suggests a non-randomized method of representing PIT histograms for count data by defining means over aggregated conditional CDFs involving the CDF P_x (given observed count x) and P_(x-1) as well as a threshold u (defined by number of bins in the histogram).

Schrödle et al. (Using integrated nested Laplace approximations for the evaluation of veterinary surveillance data from Switzerland: A case-study - 2011) and Held et al. (Posterior and cross-validatory predictive checks: A comparison of MCMC and INLA - 2010), both mention the use of adjusted PIT histograms (à la Czado) in their work (also dealing with count data). What I could not deduce, is exactly how these adjustments were conducted, if any.

I know that r-inla compute the cross-validated PIT/CPO values, and if plotted for a discrete distribution, uses PIT - 0.5 * CPO (analogue to the posterior predictive mid-p-value).
My question is simply: Is the straight forward use of the cross-validated PITs from r-inla in histograms in accordance to Czado?


Best Regards,
Henrik

--
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion-group+unsub...@googlegroups.com.
To post to this group, send email to r-inla-discussion-group@googlegroups.com.

andrea....@r-inla.org

unread,
Apr 22, 2014, 7:44:44 AM4/22/14
to r-inla-disc...@googlegroups.com
Hi Henrik,

I am familiar with the work by Schrödle et al and Held et al, and used the adapted PIT histograms myself. The adapted PIT version is just computed as described in Section 2.1 of Czado et al. The value of P_(x-1) is thereby computed as the usual PIT value minus the corresponding CPO value. Using INLA you just need to keep an eye whether the CPO/PIT values are ok (i.e. do not have failures). Sometimes you need to recompute some of the PIT/CPO values manually, which you can do using inla.cpo(result_inla).

I attach the R-code to compute the adapted PIT values including an example to check with binomial data and a Poisson example from the INLA webpage.

I hope that helps.

Best,
Andrea
pit.r

Henrik N.

unread,
Apr 23, 2014, 8:04:55 AM4/23/14
to r-inla-disc...@googlegroups.com
Hi Andrea,
thank you for your reply and attached code.
This is exactly what I needed:

The value of P_(x-1) is thereby computed as the usual PIT value minus the corresponding CPO value.


Best Regards,
Henrik
Reply all
Reply to author
Forward
0 new messages