CPO computation

161 views
Skip to first unread message

Tim Meehan

unread,
Jul 20, 2022, 2:10:49 PM7/20/22
to R-inla discussion group
Hi all,

Is there an inla() argument that forces manual computation of CPO on the first pass? I ask because, more often than not, I get some NAs. And the NAs cause trouble with log(sum(cpo)) scores, which I am using for model comparisons. I have considered using log(mean(cpo, na.rm)) but am not sure if that is a smart thing to do, as the NAs for different models might be not correspond to the same rows. I know I can use inla.cpo(), but then I have to wait for models to rerun. Or do I?

Thanks for any ideas,
Tim

Helpdesk

unread,
Jul 20, 2022, 2:17:49 PM7/20/22
to Tim Meehan, R-inla discussion group
there is no such option, as 'inla.cpo' is intented to fix this
afterwards.

however, there is work in progress on a new (group-)cpo implementation
(paper coming on arxiv soon), that do cpo as default. the approximations
are done differently, and more stable and more accurate.

its only for experimental mode, like this:

can you check that?

> r=inla(y ~ 1, data =data.frame(y=rnorm(10)),
control.compute=list(control.gcpo=list(enable=TRUE)),
inla.mode="experimental")
> r$gcpo$gcpo
[1] 0.509624652604 0.366757093028 0.323252764109 0.003874241164
0.483853663926
[6] 0.553997740777 0.461789820581 0.236727841468 0.488620518390
0.420246564313
> --
> 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 view this discussion on the web, visit
> https://groups.google.com/d/msgid/r-inla-discussion-group/ca1e3199-124b-4e81-8cd6-dafa1d43f4ban%40googlegroups.com
> .

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

Helpdesk

unread,
Jul 20, 2022, 2:21:52 PM7/20/22
to Tim Meehan, R-inla discussion group
you'll need a recent testing version for this

Finn Lindgren

unread,
Jul 20, 2022, 2:28:11 PM7/20/22
to Tim Meehan, R-inla discussion group
Also, to be clear for others reading the thread, a proper score
approach would be mean(log(cpo)) (it's essentially the
expected-log-predictive-density score), and not log(mean(cpo))
(expected-predictive-density is not a proper score).
Finn
--
Finn Lindgren
email: finn.l...@gmail.com

Tim Meehan

unread,
Jul 20, 2022, 3:16:47 PM7/20/22
to R-inla discussion group
Thanks, Haavard, for the note on the new gcpo option. I tried it out and it worked for R 4.2 with the latest INLA testing version on Windows 10. And thanks, Finn, for the correction on the scoring criteria formula! Best, Tim
Reply all
Reply to author
Forward
0 new messages