hendrik.weisser at gmx.net
2008-Jan-04 14:45 UTC
[Rd] nls (with SSlogis model and upper limit) never returns (PR#10544)
Full_Name: Hendrik Weisser Version: 2.6.1 OS: Linux Submission from: (NULL) (139.19.102.218) The following computation never finishes and locks R up:> values <- list(x=10:30, y=c(23.85, 28.805, 28.195, 26.23, 25.005, 20.475,17.33, 14.97, 11.765, 8.857, 5.3725, 5.16, 4.2105, 2.929, 2.174, 1.25, 1.0255, 0.612, 0.556, 0.4025, 0.173))> y.max <- max(values$y) > model <- nls(y ~ SSlogis(x, asym, xmid, scal), data=values, algorithm="port",start=c(asym=y.max, xmid=15, scal=-0.5), upper=c(y.max, Inf, Inf)) This used to work with R version 2.5.1 patched. The problem does _not_ occur if the parameter "scal=-0.5" in the nls call is changed, e. g. to "scal=-0.6" or "scal=-0.4". Simply calling "model <- nls(y ~ SSlogis(x, asym, xmid, scal), data=values)" also works, but this does not use the upper bound for the asym parameter, which was the point.
Peter Dalgaard
2008-Jan-04 17:23 UTC
[Rd] nls (with SSlogis model and upper limit) never returns (PR#10544)
hendrik.weisser at gmx.net wrote:> Full_Name: Hendrik Weisser > Version: 2.6.1 > OS: Linux > Submission from: (NULL) (139.19.102.218) > > > The following computation never finishes and locks R up: > > >> values <- list(x=10:30, y=c(23.85, 28.805, 28.195, 26.23, 25.005, 20.475, >> > 17.33, 14.97, 11.765, 8.857, 5.3725, 5.16, 4.2105, 2.929, 2.174, 1.25, 1.0255, > 0.612, 0.556, 0.4025, 0.173)) > >> y.max <- max(values$y) >> model <- nls(y ~ SSlogis(x, asym, xmid, scal), data=values, algorithm="port", >> > start=c(asym=y.max, xmid=15, scal=-0.5), upper=c(y.max, Inf, Inf)) > > This used to work with R version 2.5.1 patched. > The problem does _not_ occur if the parameter "scal=-0.5" in the nls call is > changed, e. g. to "scal=-0.6" or "scal=-0.4". > Simply calling "model <- nls(y ~ SSlogis(x, asym, xmid, scal), data=values)" > also works, but this does not use the upper bound for the asym parameter, which > was the point. > >"Linux" is not a good enough description of your platform. This works fine on SUSE 10.2/x86_64. -- O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
maechler at stat.math.ethz.ch
2008-Jan-05 09:45 UTC
[Rd] nls (with SSlogis model and upper limit) never returns (PR#10544)
>>>>> "PD" == Peter Dalgaard <P.Dalgaard at biostat.ku.dk> >>>>> on Fri, 04 Jan 2008 18:23:33 +0100 writes:PD> hendrik.weisser at gmx.net wrote: >> Full_Name: Hendrik Weisser >> Version: 2.6.1 >> OS: Linux >> Submission from: (NULL) (139.19.102.218) >> >> >> The following computation never finishes and locks R up: >> >> >>> values <- list(x=10:30, y=c(23.85, 28.805, 28.195, 26.23, 25.005, 20.475, >>> >> 17.33, 14.97, 11.765, 8.857, 5.3725, 5.16, 4.2105, 2.929, 2.174, 1.25, 1.0255, >> 0.612, 0.556, 0.4025, 0.173)) >> >>> y.max <- max(values$y) >>> model <- nls(y ~ SSlogis(x, asym, xmid, scal), data=values, algorithm="port", >>> >> start=c(asym=y.max, xmid=15, scal=-0.5), upper=c(y.max, Inf, Inf)) >> >> This used to work with R version 2.5.1 patched. >> The problem does _not_ occur if the parameter "scal=-0.5" in the nls call is >> changed, e. g. to "scal=-0.6" or "scal=-0.4". >> Simply calling "model <- nls(y ~ SSlogis(x, asym, xmid, scal), data=values)" >> also works, but this does not use the upper bound for the asym parameter, which >> was the point. PD> "Linux" is not a good enough description of your platform. PD> This works fine on SUSE 10.2/x86_64. It also works fine for me on - Ubuntu 7.10("gutsy") i686 - Redhat EL 5 x86_64 Martin PD> -- PD> O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B PD> c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K PD> (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 PD> ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
Gabor Grothendieck
2008-Jan-06 05:06 UTC
[Rd] nls (with SSlogis model and upper limit) never returns (PR#10544)
On my Windows Vista system it returns an answer:> values <- list(x=10:30, y=c(23.85, 28.805, 28.195, 26.23, 25.005, 20.475,+ 17.33, 14.97, 11.765, 8.857, 5.3725, 5.16, 4.2105, 2.929, 2.174, 1.25, 1.0255, + 0.612, 0.556, 0.4025, 0.173))> y.max <- max(values$y) > model <- nls(y ~ SSlogis(x, asym, xmid, scal), data=values, algorithm="port",+ start=c(asym=y.max, xmid=15, scal=-0.5), upper=c(y.max, Inf, Inf))> modelNonlinear regression model model: y ~ SSlogis(x, asym, xmid, scal) data: values asym xmid scal 28.805 17.268 -2.223 residual sum-of-squares: 32.02 Algorithm "port", convergence message: relative convergence (4)> R.version.string # Vista[1] "R version 2.6.1 Patched (2007-12-06 r43610)" On Jan 4, 2008 9:45 AM, <hendrik.weisser at gmx.net> wrote:> Full_Name: Hendrik Weisser > Version: 2.6.1 > OS: Linux > Submission from: (NULL) (139.19.102.218) > > > The following computation never finishes and locks R up: > > > values <- list(x=10:30, y=c(23.85, 28.805, 28.195, 26.23, 25.005, 20.475, > 17.33, 14.97, 11.765, 8.857, 5.3725, 5.16, 4.2105, 2.929, 2.174, 1.25, 1.0255, > 0.612, 0.556, 0.4025, 0.173)) > > y.max <- max(values$y) > > model <- nls(y ~ SSlogis(x, asym, xmid, scal), data=values, algorithm="port", > start=c(asym=y.max, xmid=15, scal=-0.5), upper=c(y.max, Inf, Inf)) > > This used to work with R version 2.5.1 patched. > The problem does _not_ occur if the parameter "scal=-0.5" in the nls call is > changed, e. g. to "scal=-0.6" or "scal=-0.4". > Simply calling "model <- nls(y ~ SSlogis(x, asym, xmid, scal), data=values)" > also works, but this does not use the upper bound for the asym parameter, which > was the point. > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >