problems reconstructing correlations using iidkd and negative binomial data

26 views
Skip to first unread message

Jan jaap poos

unread,
Nov 11, 2025, 1:01:11 PMNov 11
to R-inla discussion group
Dear mailinglist,

I am trying to use iidkd to estimate a correlation matrix for data with a negative binomial distribution. To achieve this I tried adapting the example code that is at the end of the iidkd pdf file as par of the inla documentation. In the attached html file (generated from the attached Rmd file), I try to generate example data that is correlated with negative binomial distribution. It seems that the model is able to estimate the size parameter for the distribution, but fails to estimate correlation in the data. 

I wonder if I am doing anything wrong in the setup of the model, or if there is any way of improving the estimations of the correlation matrix for this kind of data.

Kind regards,

Jan Jaap Poos  
Test_iidkd_negbin.Rmd
Test_iidkd_negbin.html

Helpdesk (Haavard Rue)

unread,
Nov 11, 2025, 1:04:10 PMNov 11
to Jan jaap poos, R-inla discussion group

The correlation would be between the components in the latent field, not the
data itself. this is why its different.
> --
> 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, visit
> https://groups.google.com/d/msgid/r-inla-discussion-group/6cfe49d7-124e-4265-b8aa-cd698cf52b0bn%40googlegroups.com
> .

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

Helpdesk (Haavard Rue)

unread,
Nov 11, 2025, 1:07:04 PMNov 11
to Jan jaap poos, R-inla discussion group
...and weaker
--
Håvard Rue
he...@r-inla.org

Jan jaap poos

unread,
Nov 12, 2025, 5:11:38 AM (14 days ago) Nov 12
to R-inla discussion group
Dear  Håvard Rue,

Thanks for the swift reply. Does this mean that variation in the data can either be explained by correlation in the latent, or by a smaller size in the negative binomial? I see that in the normal example, the precision for the gaussian distribution in the observations is assumed to be known and high. Meanwhile, would there be an implementation possible in inla that that allows for estimating a correlation between responses at the data level or would there be a way of generating data where correlations in latent field are explicitly defined and resulting in data with a negative binomial distribution with known size?

Kind regards and thanks in advance for any help, 

Jan Jaap

Reply all
Reply to author
Forward
0 new messages