Hi again,
actually, the shared component model I would like to estimate was the following:
y1 = rpois(n, E*exp(z) )
y2 = rpois(n, E*exp(beta*x + a*z) )
where "x" is a vector of covariates,
"z" follows a Besag model with graph=G (length(G)=n)
and "a" is a weight-parameter.
I used the following inla-model for its estimation, which seems to work fine in the simulations.
Y=c(y1,y2)
E=c(E,E)
X = c(rep(NA,n),x)
i = c(1:n,rep(NA,n))
j= c(rep(NA,n),1:n)
formule = Y ~ -1 + X +
f(i,model="besag",graph=G) +
f(j,copy="i",fixed=FALSE,range=c(0,1))
fit<-inla(formule,family=c("poisson"),data=data.frame(Y,X,E,i,j),E=E)
It is assumed that the weight-parameter "a" belongs to the interval (0,1).
I used the "range" option to specify this prior.
Is this the best way to express this assumption?
Thanks. Best regards.