[R] Logistic regression

Guillaume Brutel guillaume.brutel at yahoo.fr
Mon Apr 14 17:51:42 CEST 2008


Dear all,

I am trying to fit a non linear regression model to time series data.

If I do this:
reg.logis = nls(myVar~SSlogis(myTime,Asym,xmid,scal))
I get this error message (translated to English from French):
Erreur in nls(y ~ 1/(1 + exp((xmid - x)/scal)), data = xy, start = 
list(xmid = aux[1],  :
  le pas 0.000488281 became inferior to 'minFactor' of 0.000976562

I then tried to set the 'minFactor' value like this:
reg.logis = 
nls(myVar~SSlogis(myTime,Asym,xmid,scal),control=nls.control(minFactor=0.000488281))
But I have exactly the same error message, so it seems that the control 
was not changed

If I set some values for the SSlogis function like this:
reg.logis=nls(myVar~SSlogis(myTime,Asym=25,xmid=600,scal=13))
or like this:
reg.logis=nls(myVar~SSlogis(myTime,Asym=25,xmid=600,scal=13),control=nls.control(minFactor=0.000488281))
I still have the same error message.

I have also tried with setting the starting value like this:
reg.logis=nls(myVar~SSlogis(myTime,Asym=25,xmid=600,scal=13),control=nls.control(minFactor=0.000488281)
+ ,start=list(xmid=0,scal=13))
Bu then, I get this error message:
Error in nlsModel(formula, mf, start, wts) :
  singular gradient matrix at initial parameter estimates

Could someone tell me what I am doing wrong?
Many thanks
Guillaume.



More information about the R-help mailing list