INLA cpo/pit

810 views
Skip to first unread message

Lennon

unread,
Mar 18, 2013, 7:32:12 PM3/18/13
to r-inla-disc...@googlegroups.com
I am fitting a very simple Gaussian model, when I tried the cpo options the values I got are all small, ranging from 0 - 0.12, my question is what does this mean? how small is small? the pit histogram is pretty uniform though....

INLA help

unread,
Mar 19, 2013, 7:48:09 AM3/19/13
to Lennon, r-inla-disc...@googlegroups.com
the cpo, is

log \pi( y_i | y_-i)

it is hard to interpret a single value for this reason.

Best
H

--
Håvard Rue
he...@r-inla.org

INLA help

unread,
Mar 19, 2013, 4:50:35 PM3/19/13
to Ye Li, r-inla-disc...@googlegroups.com

On Tue, 2013-03-19 at 09:33 -0400, Ye Li wrote:
> is it on the log scale? Here are values of my cpo, does it mean the
> model is bad?


you're right. its not on log-scale. its on the original scale. my fault.
sorry about that.

here is a test-case

H

********************************************
> r=inla(y ~ 1, data = data.frame(y=-10:10), control.fixed =
list(prec.intercept = 1e9), control.compute=list(cpo=TRUE),
control.family = list(hyper = list(prec = list(initial =
0,fixed=TRUE))))
> r$cpo$cpo
[1] 7.700962393e-23 1.028664336e-18 5.054929575e-15 9.138382759e-12
[5] 6.077658821e-09 1.487017471e-06 1.338469883e-04 4.432144575e-03
[9] 5.399231985e-02 2.419707179e-01 3.989389539e-01 2.419707179e-01
[13] 5.399231985e-02 4.432144575e-03 1.338469883e-04 1.487017471e-06
[17] 6.077658821e-09 9.138382759e-12 5.054929575e-15 1.028664336e-18
[21] 7.700962393e-23
> dnorm(-10:10)
[1] 7.694598627e-23 1.027977357e-18 5.052271084e-15 9.134720408e-12
[5] 6.075882850e-09 1.486719515e-06 1.338302258e-04 4.431848412e-03
[9] 5.399096651e-02 2.419707245e-01 3.989422804e-01 2.419707245e-01
[13] 5.399096651e-02 4.431848412e-03 1.338302258e-04 1.486719515e-06
[17] 6.075882850e-09 9.134720408e-12 5.052271084e-15 1.027977357e-18
[21] 7.694598627e-23
>


--
Håvard Rue
he...@r-inla.org

--
Håvard Rue
he...@r-inla.org

Elias Teixeira Krainski

unread,
Mar 19, 2013, 5:38:06 PM3/19/13
to r-inla-disc...@googlegroups.com
On Mon, 2013-03-18 at 12:32 -0700, Lennon wrote:
I think that if you don't have covariates
or a latent field that explains the response
very well, the CPO values are small.

Iosu Paradinas

unread,
Aug 12, 2014, 10:39:10 AM8/12/14
to r-inla-disc...@googlegroups.com, ye...@utoronto.ca, he...@r-inla.org
Hello,
I am fitting a model using a beta likelihood and I get cpo values above 1.
are these in particular computed in another scale?

thanks

set.seed(1)
resp=rbeta(100,1,1)
cov=rnorm(100)
r<- inla(resp~cov,
           family="beta",
           data=list(resp=resp,cov=cov),
           control.compute = list(return.marginals=TRUE, dic=TRUE, cpo=TRUE),
)
r$cpo$cpo

Finn Lindgren

unread,
Aug 12, 2014, 10:52:33 AM8/12/14
to Iosu Paradinas, r-inla-disc...@googlegroups.com
On 12/08/14 11:39, Iosu Paradinas wrote:
> Hello,
> I am fitting a model using a beta likelihood and I get cpo values above 1.
> are these in particular computed in another scale?

The definition is

CPO = p(y_i | y_{-i})

which for continuous distributions is a density that can take any
non-negative value. Maybe you're confusing it with the PIT values, that
are probabilities, and hence should always be between 0 and 1?

Finn L

Iosu Paradinas

unread,
Aug 12, 2014, 2:25:00 PM8/12/14
to r-inla-disc...@googlegroups.com, paradin...@gmail.com
Yes, I thought they were probabilities too...

thank you very much
Reply all
Reply to author
Forward
0 new messages