On Sun, 2021-05-09 at 09:40 -0700,
vit...@osu.edu wrote:
> Could someone help me understand the difference between the two
> specifications below, where the aim is to induce a random slope on the
> covariate X?
There is also a the model 'intslope' that simplifies the spesification
of a random intercept-slope model (when it applies)
> I've seen both specifications for random slopes in the
> literature on INLA. Is the difference that Model 2 says that
> everything
> about the slope is random, whereas Model 1 says that there's a common
> (fixed) component in addition to the random one? If so, then absent a
> strong theory, why would one want to use Model 2, since if it's
> correct,
> then the coefficient on X in Model 1 ought to be revealed as
> essentially
> zero?
>
> The two specifications:
>
> Model 1: y~1+ X + f(id,X,model="iid)
this is an overparameterisation and gives a lin.predictor as
intercept + beta * x + u(id) * x
where 'u(id)' is the random intercept. in the case where id=1:n, f.ex,
then you can move a constant from 'beta' to the u's, hence the
overparametersation.
you may add
f(id, X, model="iid", constr=TRUE)
then u(id)'s will sum to zero, hence the 'beta' will be the average
effect, and the 'u(id)'s the variations around it.
> Model 2: y~1 + f(id,X, model="iid)
>
this is
intercept + u(id) * x
only, where the u(id)'s have a common (and unknown) precision
--
Håvard Rue
he...@r-inla.org