Question About Shared Random Effects and the copy Feature

32 views
Skip to first unread message

Aria

unread,
Jun 5, 2025, 5:14:32 PM6/5/25
to R-inla discussion group
Hello,

I have a question regarding shared effects in my model. My formula is as follows:


fomula = ... + f(r.Y, model="iid",  hyper = list(theta = list(initial=log(L.Y),fixed=TRUE))) + f(b.Y, copy="r.Y", hyper = list(beta = list(initial = tau, fixed = TRUE))). 


In this setup, Y appears in both Model 1 and Model 2, and they are meant to share the same random effect. I have Y in model 1 and tau*Y in model 2. I expected r.Y and b.Y to have the same values. However, I noticed that the estimates of r.Y and b.Y differ.

I came across the explanation that "the main difference between the copy and replicate features is that with the copy effect, the values of the random effects are the same, but copied effects can be scaled by a parameter." I’m wondering if the difference in estimates is due to b.Y being scaled, and if so, what parameter is responsible for this scaling?

Additionally, which of the two—r.Y or b.Y—should be considered the true estimate of Y?


Thank you for your help.


Helpdesk (Haavard Rue)

unread,
Jun 7, 2025, 4:51:10 AM6/7/25
to Aria, R-inla discussion group
check this example and also 'data' showing how to use NA to remove ignore terms
> --
> 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/812688c4-19ad-4c5a-9bf2-9f6bda2d6f90n%40googlegroups.com
> .

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