Re: [R] Non linear Regression: "singular gradient matrix at initial parameter estimates"

2011-04-12 Thread Felix Nensa
Hi Mario, yes works great. Thanks! 2011/4/12 Mario Valle > Use a more realistic starting point instead of the default one: > > fit <- nls(yeps ~ p1 / (1 + exp(p2 - x)) * exp(p4 * x), > start=list(p1=410,p2=18,p4=-.03)) > > This works for me: > > fit > Nonlinear regression model > model: yeps ~

Re: [R] Non linear Regression: "singular gradient matrix at initial parameter estimates"

2011-04-12 Thread Mario Valle
Use a more realistic starting point instead of the default one: fit <- nls(yeps ~ p1 / (1 + exp(p2 - x)) * exp(p4 * x), start=list(p1=410,p2=18,p4=-.03)) This works for me: > fit Nonlinear regression model model: yeps ~ p1/(1 + exp(p2 - x)) * exp(p4 * x) data: parent.frame() p1

Re: [R] Non linear Regression: "singular gradient matrix at initial parameter estimates"

2011-04-12 Thread Felix Nensa
Hi Peter, thank you for your reply. Now I see, that P3 is indeed redundand. But with the simplified model... fit = nls(yeps ~ p1 / (1 + exp(p2 - x)) * exp(p4 * x)) ...nls still produces the same error. Any ideas? Felix 2011/4/12 Peter Ehlers > On 2011-04-11 13:29, Felix Nensa wrote: > >> Hi,

Re: [R] Non linear Regression: "singular gradient matrix at initial parameter estimates"

2011-04-12 Thread Peter Ehlers
On 2011-04-11 13:29, Felix Nensa wrote: Hi, I am using nls to fit a non linear function to some data but R keeps giving me "singular gradient matrix at initial parameter estimates" errors. For testing purposes I am doing this: ### R code ### x<- 0:140 y<- 200 / (1 + exp(17 - x)/2) * exp(-0.02*

[R] Non linear Regression: "singular gradient matrix at initial parameter estimates"

2011-04-11 Thread Felix Nensa
Hi, I am using nls to fit a non linear function to some data but R keeps giving me "singular gradient matrix at initial parameter estimates" errors. For testing purposes I am doing this: ### R code ### x <- 0:140 y <- 200 / (1 + exp(17 - x)/2) * exp(-0.02*x) # creating 'perfect' samples with fit