[R-sig-ME] lmer formula

Ben Bolker bbo|ker @end|ng |rom gm@||@com
Sun Apr 10 01:07:26 CEST 2022


   This is not possible in lme4, which requires a *linear* model (some 
incorporation of constants is possible via offsets, but only additive 
constants).

   Using nlme() from the nlme package, something like

nlme(Reaction ~ A1*mu1/(B2*mu2) + mu3,
      fixed = list(mu1 ~ Days,
                   mu2 ~ C1),
      random = ~ 1 | mu3
)

might work.  But keep in mind that when you fit nonlinear mixed effects 
models you often have to be much clearer by what you mean by "estimating 
fixed effects for" something -- this will typically involve a sub-model 
that is a linear model for a parameter that enters the top-level 
nonlinear equation.



On 4/9/22 3:11 PM, Andras Farkas via R-sig-mixed-models wrote:
> Hello,
> 
> could you please provide input on the following formula (please ignore the widely known example of the sleepstudy data and its analysis for a moment and assume we have this formula here) :
> 
>   m1 <- lmer(Reaction ~ ((A1*Days)/(B2*C1)) + (1 | Subject), sleepstudy)
> 
> this simple example - similar to my actual real life model of greeter complexity - what I would try to do is to estimate fixed effects for "Days" and "C1", but not for "A1"
> and "B2". In this hypothetical example A1, B2, AND C1 all have a column with values in the data sleepstudy, but instead of estimating a coefficient for A1 and B2 we would just use the actual values of them as they appear in the spreadsheet in the calculations.
> 
> hope I am not way off with my question, but could you please advise as to how the model formula would need to be written in this case?
> 
> much appreciate the help,
> 
> thanks,
> 
> 
> Andras
> 
> _______________________________________________
> R-sig-mixed-models using 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