specification of random slope models

376 views
Skip to first unread message

vit...@osu.edu

unread,
May 9, 2021, 12:40:04 PM5/9/21
to R-inla discussion group
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? 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)
Model 2: y~1 + f(id,X, model="iid)

(The, difference is that the first specification includes X among the fixed covariates, while the second doesn't).

Thanks for any help on this!



Helpdesk

unread,
May 9, 2021, 12:52:13 PM5/9/21
to vit...@osu.edu, R-inla discussion group
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

Reply all
Reply to author
Forward
0 new messages