search for: lscal

Displaying 7 results from an estimated 7 matches for "lscal".

Did you mean: local
2001 May 01
0
SSfpl self-start sometimes fails... workaround proposed
Hello, nls library provides 6 self-starting models, among them: SSfp, a four parameters logistic function. Its self-starting procedure involves several steps. One of these steps is: pars <- as.vector(coef(nls(y ~ cbind(1, 1/(1 + exp((xmid - x)/exp(lscal)))), data = xydata, start = list(lscal = 0), algorithm = "plinear"))) which assumes an initial value of lscal equal to 0. If lscal is very different to 0, the evaluation could fail (singular gradient,...), as it is the case with the dataset provided hereunder (see end of this message). A...
2008 Feb 18
2
skip non-converging nls() in a list
...List does not converge for some individuals. 4. I decided to go around nlsList using: t(sapply(split(data, list(data$id)), function(subd){coef(nls(mass ~ SSfpl(age, A, B, xmid, scal), data = subd))})) 5. This does not converge either: 'Error in nls(y ~ cbind(1, 1/(1 + exp((xmid - x)/exp(lscal)))), data = xy, : singular gradient' 6. Would anyone know if I can get R to skip non-converging use of nls() so that I can at least obtain the parameters for the curves which R can fit? Thanks for your time, Marc =================== Marc B?lisle Professeur adjoint Chaire de recherch...
2006 Aug 04
1
gnlsControl
When I run gnls I get the error: Error in nls(y ~ cbind(1, 1/(1 + exp((xmid - x)/exp(lscal)))), data = xy, : step factor 0.000488281 reduced below 'minFactor' of 0.000976563 My first thought was to decrease minFactor but gnlsControl does not contain minFactor nor nlsMinFactor (see below). It does however contain nlsMaxIter and nlsTol which I assume are the analogs...
2007 Oct 17
2
nmle: gnls freezes on difficult case
...- 0.001 xy$prop <- log((B-xy$y)/(xy$y-A+0.001)) #(xy$y - rng[1] + 0.05 * drng)/(1.1 * drng) ir <- as.vector(coef(lm(prop ~ log(x), data = xy))) scal <- ir[2] xmid <- exp(-ir[1]/ir[2]) #pars <- as.vector(coef(nls(y ~ cbind(1, 1/(1 + exp((xmid - # x)/exp(lscal)))), data = xy, start = list(xmid = ir[1], # lscal = log(abs(ir[2]))), algorithm = "plinear"))) value <- c(A, B, xmid, scal) names(value) <- mCall[c("A", "B", "xmid", "scal")] value }, c("A", "B", &qu...
2005 Jun 02
1
nls.control: increasing number of iterations
...p, I've tried to do this using the "control" argument: nls(y ~ SSfpl(x, A, B, xmid, scal), data=my.data, control=nls.control(maxiter=200)) but no matter how much I increase "maxiter", I get the following error message: Error in nls(y ~ cbind(1, 1/(1 + exp((xmid - x)/exp(lscal)))), data = xy, : number of iterations exceeded maximum of 50 The second line here suggests that the maximum number of iterations is still 50, despite changing the "control" argument. Also, increasing "maxiter" to something silly, like 50000, doesn't seem to inc...
2005 Apr 23
1
start values for nls() that don't yield singular gradients?
...SSgompertz" -- the formula in "SSgompertz" is not the same as the one I need above, since it has three parameters instead of four. I've tried it and SSfpl thusly: > getInitial(y ~ SSfpl(x,a,b,c,d),data=data.frame(x=x,y=y)) Error in nls(y ~ cbind(1, 1/(1 + exp((xmid - x)/exp(lscal)))), data = xy, : step factor 0.000488281 reduced below `minFactor' of 0.000976563 And this: > getInitial(y ~ SSgompertz(x,a,b,c),data=data.frame(x=x,y=y)) Error in nls(y ~ cbind(1, 1 - exp(-exp(lrc) * x)), data = xy, start = list(lrc = as.vector(log(-coef(lm(log(abs(y - :...
2007 Jun 14
0
nlsList problems: control option does not effect output and strange environment search
...for 200 persons in 4 groups. Next I sample for each person five observations one at the start, one at the end and three randomly in between. Now I get the following error messages: testnlslist2<-nlsList(SSfpl,groupedData(Y~Time|group, datset)) Error in nls(y ~ cbind(1, 1/(1 + exp((xmid - x)/exp(lscal)))), data = xy, : step factor 0.000488281 reduced below 'minFactor' of 0.000976562 Error in nls(formula = formula, data = data, control = control) : singular gradient For the first error it could be that this is due to the fact that this group is simulated as a kind of p...