You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to R-inla discussion group
I am fitting a spatiotemporal Binomial model with an overall spatial effect, an overall temporal effect, and an interaction term using the group argument (adapted from a code example I found online):
inla(formula = y ~ -1 +
f(i_time, model='rw2', constr=FALSE) +
f(i_spat, model='besag', graph=adj_graph) +
f(i_spat_2, model='iid',
group=i_time, control.group=list(model='ar1')),
data = inla_data,
family='binomial', Ntrials=n)
In my code I also constrain the hyperparameters of the iid and the ar1 models in the interaction term so that the interaction term is small. The results look reasonable. However, I'm not sure how I should write this model down mathematically. I guess I have something like
y(s,t) ~ Bin(p(s,t))
logit(p(s,t)) = f(s) + g(t) + h(s,t)
f(s) ~ CAR1(s)
g(t) ~ RW2(t)
But what is h?
Helpdesk
unread,
Jun 9, 2021, 11:08:24 AM6/9/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Stefan Siegert, R-inla discussion group
iid group ar1
is the same as
ar1 group iid
so that is for each i_spat_2, you have an ar1 process, and all
ar1'processes are (conditional) indendent.
I guess if you want a 'space time model', you would do
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to R-inla discussion group
Thanks, very useful. Especially "iid group ar1" == "ar1 group iid" is something I was wondering about.
So is it correct that in my notation I would have
h(s,t) ~ AR1(t) independent for all s = 1, ..., S
I noticed that when increasing the precision hyperparameter of the iid model shrinks the interaction terms h(s,t) towards zero. Can we then still say that the AR1s are conditionally independent?
How would the "besag group ar1" model you propose be written mathematically?
Helpdesk
unread,
Jun 9, 2021, 12:16:42 PM6/9/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message