Thanks Ben. I guess in my reading I assumed those were built-in functions like SSlogis. I’ll contact the authors for more information on their custom functions. It was strange that there was no more info in the paper or supplements.

Thanks,
Dan
------------------------------------------------------------------------------------
Daniel J. Hocking
114 James  Hall
Department of Natural Resources & the Environment
University of New Hampshire
Durham, NH 03824

dhocking@unh.edu<mailto:dhocking@unh.edu>
Office: (603)-862-1408
http://danieljhocking.wordpress.com/

"Somewhere, something incredible is waiting to be known" - Carl Sagan
-------------------------------------------------------------------------------------


From: Ben Bolker <bbolker@gmail.com<mailto:bbolker@gmail.com>>
Subject: Re: [R-sig-ME] nlmer self starting function
Date: February 28, 2014 at 6:25:05 PM EST
To: <r-sig-mixed-models@r-project.org<mailto:r-sig-mixed-models@r-project.org>>


Daniel Hocking <dhocking@...> 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

	[[alternative HTML version deleted]]

