Model structure when group argument is used vs. replicate

615 views
Skip to first unread message

Jason Fischer

unread,
Feb 10, 2021, 4:47:59 PM2/10/21
to R-inla discussion group

Hi All,

Could someone please help me better understand how INLA structures a model with the group argument is used in the f() call? I am conducting a simulation study and would like to use an AR(1) model with grouping to analyze the simulated data. Ideally, I would like the simulation approach to match the model structure. From what I’ve read within the discussion forum and Virgilio Gómez-Rubio’s book (https://becarioprecario.bitbucket.io/inla-gitbook/ch-temporal.html#separable-models-with-the-group-option), I understand that the grouping function describes a GMRF with a mean of zero and covariance matrix of τ∑b⊗∑w, where ∑b is the structure of the covariance between groups and ∑w is the structure within groups, although it seems odd that the covariance structures are multiplied by precision, unless I’m misunderstanding τ in the previous equation. I’ve also read that INLA fixes covariance at 1, making a ∑b matrix with 1 along the diagonal and the group ρ elsewhere:

betweenGroupCorrelation.png

However, I’m less sure about how the different group models (e.g., exchangeable, iid) are implemented. This leads me to three primary questions:

1) Are the sub-matrices of the GMRF covariance matrix multiplied by a precision parameter or am I misunderstanding τ? Since INLA uses precision I would expect τ∑b-1⊗∑w-1.

2) How are the different group models implemented? I’m particularly interested in the difference between the exchangeable and iid models. It seems like this comes down to the groupRho parameter, is the groupRho fixed at 0 for iid models, making ∑b an identity matrix?

3) When the group model is iid, what is the difference between using the group argument vs. the replicate argument (e.g., f(time, model=”ar1”, group=groupID, group.control=list(model=”iid”)) vs. f(time, model=”ar1”, replicate=groupID)? Models run with each formulation yield similar results and from what I’ve read, it seems like both calls result in AR(1) processes where groups share the same hyperparameters, but are not correlated. Is the difference that grouped iid model produces a nYear*nGroup X nYear*nGroup covariance matrix to simultaneously describe the ar(1) process for all groups, where as the replicate approach reuses the same nYear X nYear covariance matrix for each group?

I’ve attached a toy data set and R code simulating data to provide an example of how I think the models are structured, in case it helps to further describe my question.

Thanks,

Jason

ar1GroupModels.zip

Finn Lindgren

unread,
Feb 10, 2021, 5:06:13 PM2/10/21
to R-inla discussion group
Hi Jason,

some quick answers:

My preferred way of conceptualising it is that _all_ f() models have the structure "main"x"group"x"replicate", where group and replicate
have precision=1 (a 1x1 unit matrix) unless specified otherwise.
Then the only difference between your "ar1"x"group(iid)" and "ar1"x"replicate" examples is that some different code paths may be followed internally;
the purely mathematical definitions are identical.

Each model has its own internal definition, so "iid" is not just "exchangeable" with groupRho=0, but rather explicitly implemented as a scaled identity matrix.

For models with group or replicate models, having multiple multiplicative scaling parameters wouldn't be useful, since they would be non-identifiable, which
is why each f() model only has a single scaling parameter, that scales the precision.
I believe the expression with tau as scaling the covariance matrix in the link you provided is just a bit confused/confusing,
since it doesn't seem to actually define what that \tau is in relation to the implementation; if \tau scales the covariance, then 1/\tau scales the precision, so it's just a matter of notation.

The inverse of a kronecker product is the kronecker product of the inverses, which is why it doesn't really matter if the product is for covariances
or for precisions; it's the same thing (except, and this can sometimes be essential, for intrinsic models, since they don't have full precision rank, and this needs to be carefully handled by the modeller)

Finn

--
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/3e393b3c-1068-4c5f-b6be-f9c44dc245bdn%40googlegroups.com.


--
Finn Lindgren
email: finn.l...@gmail.com

Finn Lindgren

unread,
Feb 10, 2021, 5:10:11 PM2/10/21
to R-inla discussion group
...or in the kronecker definition I tend to use, the precision of a model is Q = Q_replicate x Q_group x Q_"main",
which gives the order inla models are stored in, with the "main" index varying most quickly, and the replicate index varying most slowly.

Finn

Helpdesk

unread,
Feb 13, 2021, 4:54:32 AM2/13/21
to Finn Lindgren, R-inla discussion group

There are some slides describing the motivation for introducing this in
the repo,

https://github.com/hrue/r-inla/tree/devel/internal-doc/group


which might be useful.
Håvard Rue
he...@r-inla.org

Reply all
Reply to author
Forward
0 new messages