O'Reilly logo

The R Book by Michael J. Crawley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Self-starting Functions

One of the most likely things to go wrong in non-linear least squares is that the model fails because your initial guesses for the starting parameter values were too far off. The simplest solution is to use one of R's ‘self-starting’ models, which work out the starting values for you automatically. These are the most frequently used self-starting functions:

SSasymp      asymptotic regression model
SSasympOff   asymptotic regression model with an offset
SSasympOrig  asymptotic regression model through the origin
SSbiexp      biexponential model
SSfol        first-order compartment model
SSfpl        four-parameter logistic model
SSgompertz   Gompertz growth model
SSlogis      logistic model
SSmicmen     Michaelis–Menten model
SSweibull    Weibull growth curve model

Self-starting Michaelis–Menten model

In our next example, reaction rate is a function of enzyme concentration; reaction rate increases quickly with concentration at first but asymptotes once the reaction rate is no longer enzyme-limited. R has a self-starting version called SSmicmen parameterized as

images

where the two parameters are a (the asymptotic value of y) and b (which is the x value at which half of the maximum response, a/2, is attained). In the field of enzyme kinetics a is called the Michaelis parameter (see p. 202; in R help the two parameters are called Vm and K respectively).

Here is SSmicmen in action:

data<-read.table("c:\\temp\\mm.txt",header=T) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required