How to specify control.family and control.link arguments for multiple distributions

15 views
Skip to first unread message

Bas Matsuura

unread,
Mar 22, 2023, 6:20:46 AM3/22/23
to R-inla discussion group
Hi all,

I was trying to specify a link function in the control.family argument. Then I read in the documentation specifying the link like this is now obsolete. Instead I should be using control.link. I am trying to create a mixture distribution. The code looks something like this:

  res <- inla(Y ~ -1 + Intercept, data = list(Y = Y, Intercept = Intercept),
             family = rep("gaussian", 3),
             control.fixed = list(mean = list(Intercept1 = -4,
                                              Intercept2 = 0.01,
                                              Intercept3 = 4),
                                              prec = 0.01),
             control.family = list(control.link = list(model = "identity"))

How should I formulate the last line in this case? The control family, that is. I could not find any documentation online on how to do this. Is it even necessary to explicitly mention this argument in this case, or is this 'identity' setting already selected by default?

Best,

Bas

Helpdesk (Haavard Rue)

unread,
Mar 23, 2023, 3:52:47 AM3/23/23
to Bas Matsuura, R-inla discussion group
with three likelihoods, then the control.family needs to be

control.family=list( list(), list(), list())

where each 'list()' is a control.family as is given for a single
likelihood model, like in your case

list( list(control.family=list(model="identity")),
list(control.family=list(model="identity")),
list(control.family=list(model="identity")))

which is the default
> --
> 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/97217f1f-eed5-4ec0-b876-8a95eb081cb6n%40googlegroups.com
> .

--
Håvard Rue
he...@r-inla.org
Reply all
Reply to author
Forward
0 new messages