[R-sig-ME] Parameter restrictions
Douglas Bates
bates at stat.wisc.edu
Mon Oct 4 19:38:17 CEST 2010
On Mon, Oct 4, 2010 at 3:07 AM, Felix Lamp <lamp at ese.eur.nl> wrote:
> Dear all,
> is there a simple way in R to add parameter restrictions to linear mixed effects models. Specifically I would like to restrict a slope coefficient to be equal to 1.
That is done by adding an offset, which can be done in two ways. The
general model might be
lmer(y ~ 1 + x + (1|g))
and the model with the slope restricted to 1 is either
lmer(y ~ 1 + offset(x) + (1|g))
or
lmer(y ~ 1 + (1|g), offset=x)
IIRC one of them works properly and one doesn't although I can't
recall which one is which. Try them both.
More information about the R-sig-mixed-models
mailing list