[R-sig-ME] nlmer self starting function

Ben Bolker bbolker at gmail.com
Sat Mar 1 00:25:05 CET 2014


Daniel Hocking <dhocking at ...> writes:

 
> I am trying to use the following nlmer function to estimate random
> break points in a polynomial smooth break point regression (sense
> Hout et al. 2011:

> nl1 <- nlmer(Reaction ~ SSPoly(Days,n0,n1,n2,n3) ~
> (n0|Subject)+(n1+n2|Subject)+(n3|Subject), data=sleepstudy, start =
> c(n0=22, n1=0, n2=-1, n3=-4)) I get the error: Error in eval(expr,
> envir, enclos) : could not find function “SSPoly"

The SSBW and SSPoly functions are implemented by Hout et al., they're
not (and have never been) in lme4.  I looked at the paper and couldn't
find any details about what these functions actually look like or
where they can be obtained: 

http://onlinelibrary.wiley.com/doi/10.1002/sim.4127/full#app1

says, in full,

"The Bacon–Watts mixed-effects model and the polynomial mixed-effects
model can be estimated in R using nlmer with user-defined
self-starting non-linear models. We define self-starting functions
SSBW and SSPoly, and use calls such as [EQUATION: nlmer(y ~ SSBW(...),
...)]  and [EQUATION: nlmer(y~SSPoly(...), ...)]  where t denotes time
and id is the subject identifier in data.

Self-starting SSBW and SSPoly include specifications of the
gradient. For the Bacon–Watts model, the gradient in SSBW is in closed
form. For the polynomial model, we used numerical procedures in SSPoly
to approximate the gradient. As a result, the polynomial model takes
more time to be estimated than the Bacon-Watts model."

I couldn't see any further supplementary materials anywhere in the web
page for the article. Googling "'van den Hout' SSPoly' didn't help
either.  I guess you'll have to contact the authors.

> I assume this is due to changes in lme4 versions. I am not
> experienced with the nlmer function and writing custom functions and
> start functions. Does anyone have recommendations on the easiest way
> to implement this model (preferable without going to WinBUGS/JAGS)?

 good luck,
  Ben Bolker



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