[R] help with nls and Hill equation

Ravi Varadhan rvaradhan at jhmi.edu
Tue Oct 16 17:15:36 CEST 2007


Another approach that usually works well is to use the option: algorithm =
"port".  This uses the "nl2sol" routine.  

foo.nls <- nls(var~Emax*(Dose^hill)/((EC50^hill)+(Dose^hill)),
start=list(Emax=-4,EC50=269,hill=1), algorithm="port", trace=T,data=foo)

This generally has more robust convergence than the default "Gauss-Newton"
with a Marquardt-type modification.

Ravi.

----------------------------------------------------------------------------
-------

Ravi Varadhan, Ph.D.

Assistant Professor, The Center on Aging and Health

Division of Geriatric Medicine and Gerontology 

Johns Hopkins University

Ph: (410) 502-2619

Fax: (410) 614-9625

Email: rvaradhan at jhmi.edu

Webpage:  http://www.jhsph.edu/agingandhealth/People/Faculty/Varadhan.html

 

----------------------------------------------------------------------------
--------


-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Christian Ritz
Sent: Tuesday, October 16, 2007 10:01 AM
To: Lanre Okusanya
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] help with nls and Hill equation

Hi!

I would suggest trying out a few different starting values as a first
unsystematic approach.

For example changing hill=1 to hill=2 results in convergence:

foo.nls<-nls(var~Emax*(Dose^hill)/((EC50^hill)+(Dose^hill)),
start=list(Emax=-4,EC50=269,hill=2),trace=T,data=foo)



Christian

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list