[R-sig-ME] fixing the value of some parameters in an lme or lmer model

Thierry Onkelinx thierry.onkelinx at inbo.be
Wed Mar 29 11:00:40 CEST 2017

Dear Asher,

You start from a model with this equation $y = \beta_0 + \beta_1 week
+ b_{i0} + b_{i1} week$
The fit of the baseline of each patient is $baseline_i = \beta_0 +
b_{i0}$ but you want $baseline_i = b_{i0}$ hence $\beta_0 = 0$
Forcing a parameter to be 1 can be done with offset(): $y = 0 +
\beta_1 week + offset(baseline_i) + b_{i1} week$

The lmer formula becomes y ~ offset(baseline) + week + (0 + week |
subject), assuming that the baseline has week = 0 and week is

Best regards,

ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht

To call in the statistician after the experiment is done may be no
more than asking him to perform a post-mortem examination: he may be
able to say what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does
not ensure that a reasonable answer can be extracted from a given body
of data. ~ John Tukey

2017-03-29 10:39 GMT+02:00 Asher Strauss <asher.strauss op gmail.com>:
> Dear list,
> I am trying to fit a two level hierarchical model using the lme/lmer
> function.
> I have two levels in my data: 3 time points (codded: week 0, week 4, week
> 8) nested within subjects (ID). I would like to set the intercept of each
> patient to the value of the outcome at week 0 (the first observation), or
> in other words force the model fit for each subject to pass through the
> subject's baseline score on the outcome variable.
> Here are the formulas (in informal notation):
> Level 1: (time)
> outcome=b0+b1*week+error
> Level 2: (subjects)
> b0=*0*+*1**"outcome-at-time-0"
> b1="grand-slope"+error
> I underlined and made bold the values I would like to force.
> Can this be done in nlme or lme4 packages?
> Thank you very much!!!
> Asher Strauss
>         [[alternative HTML version deleted]]
> _______________________________________________
> R-sig-mixed-models op r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

More information about the R-sig-mixed-models mailing list