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: [EMAIL PROTECTED] Webpage: http://www.jhsph.edu/agingandhealth/People/Faculty/Varadhan.html ---------------------------------------------------------------------------- -------- -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christian Ritz Sent: Tuesday, October 16, 2007 10:01 AM To: Lanre Okusanya Cc: [EMAIL PROTECTED] 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@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. ______________________________________________ R-help@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.