the issue about 'factors' is that in the freq viewpoint, the common
approach is to chose a reference category, and then everything else is
relative to that one, this is what happen with 'lm()' and relatives,
> model.matrix(~1+x, data=data.frame(x=as.factor(c(1,2,3))))
(Intercept) x2 x3
1 1 0 0
2 1 1 0
3 1 0 1
attr(,"assign")
[1] 0 1 1
attr(,"contrasts")
attr(,"contrasts")$x
[1] "contr.treatment"
from a Bayesian point of view, this leads to a non-exchangable prior
for 'x', as the marginal variance depends on the choice of reference
category. As an alternative, you can use the iid which sums to zero,
f(x, model="iid", constr=T)
so that the average effect of 'x' is zero.
this one, explains a third strategy
http://www.r-inla.org/faq#TOC-How-does-inla-deal-with-NA-s-in-the-data-argument-
by setting the expand.factor.strategy="inla", then you'll get a
'singular' expandsion without the reference group, but then only
contrasts are likelihood identifiable. see the refence for details.
there is no single best solution here...
Best
H
> > .4049 202.5709
> --
> 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 post to this group, send email to
>
r-inla-disc...@googlegroups.com.
> Visit this group at
>
https://groups.google.com/group/r-inla-discussion-group.
> For more options, visit
https://groups.google.com/d/optout.
--
Håvard Rue
Helpdesk
he...@r-inla.org