similar to: change maxiter for nls

Displaying 20 results from an estimated 10000 matches similar to: "change maxiter for nls"

2006 Aug 15
4
nls
Is there anyway to change any y[i] value (i=2,...6) to make following NLS workable? x <- c(0,5,10,15,20,25,30) y <- c(1.00000,0.82000,0.68000,0.64000,0.66667,0.68667,0.64000) lm(1/y ~~ x) nls(1/y ~~ a+b*x^c, start=list(a=1.16122,b=0.01565,c=1), trace=TRUE) #0.0920573 : 1.16122 0.01565 1.00000 #Error in numericDeriv(form[[3]], names(ind), env) : # Missing value or
2006 Nov 08
1
nls
> y [1] 1 11 42 64 108 173 214 > t [1] 1 2 3 4 5 6 7 > nls(1/y ~ c*exp(-a*b*t)+1/b, start=list(a=0.001,b=250,c=5), trace=TRUE) 29.93322 : 0.001 250.000 5.000 Error in numericDeriv(form[[3]], names(ind), env) : Missing value or an infinity produced when evaluating the model # the start value for b is almost close to final estimates, # a is usually
2006 Nov 08
5
query in R
how to realize the following SQL command in R? select distinct A, B, count(C) from TABLE group by A, B ; quit; Best Regards --------------------------------- Sponsored Link Get a free Motorola Razr! Today Only! Choose Cingular, Sprint, Verizon, Alltel, or T-Mobile. [[alternative HTML version deleted]]
2005 Oct 21
2
curve fit
How to obtain the FUNCTION for the following smooth curve? x 0 100 250 500 1000 4000 y 1.8 1.2 1.02 0.99 0.97 0.85 Thanks, SJ --------------------------------- [[alternative HTML version deleted]]
2005 Jun 02
1
nls.control: increasing number of iterations
Hello, I'm using the nls function and would like to increase the number of iterations. According to the documentation as well as other postings on R-help, 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
2006 Jul 07
1
convert ms() to optim()
How to convert the following ms() in Splus to Optim in R? The "Calc" function is also attached. ms(~ Calc(a.init, B, v, off, d, P.a, lambda.a, P.y, lambda.y, 10^(-8), FALSE, 20, TRUE)$Bic, start = list(lambda.a = 0.5, lambda.y = 240), control = list(maxiter = 10, tol = 0.1)) Calc <- function(A.INIT., X., V., OFF., D., P1., LAMBDA1., P2., LAMBDA2., TOL., MONITOR.,
2000 Jul 28
2
Using the nls package
I'm a bit confused about the nls package, I'm trying to use it for curve fitting. First off, the documentation for nls says ``see `nlsControl' for the names of the settable control values'' -- this is wrong, it should be nls.control (minor point but had me confused for a moment). Now I'll try something very simple (maybe too simple):
2007 Sep 05
3
'singular gradient matrix’ when using nls() and how to make the program skip nls( ) and run on
Dear friends. I use nls() and encounter the following puzzling problem: I have a function f(a,b,c,x), I have a data vector of x and a vectory y of realized value of f. Case1 I tried to estimate c with (a=0.3, b=0.5) fixed: nls(y~f(a,b,c,x), control=list(maxiter = 100000, minFactor=0.5 ^2048),start=list(c=0.5)). The error message is: "number of iterations exceeded maximum of
2006 May 21
2
nls & fitting
Dear All, I may look ridiculous, but I am puzzled at the behavior of the nls with a fitting I am currently dealing with. My data are: x N 1 346.4102 145.428256 2 447.2136 169.530634 3 570.0877 144.081627 4 721.1103 106.363316 5 894.4272 130.390552 6 1264.9111 36.727069 7 1788.8544 52.848587 8 2449.4897 25.128742 9 3464.1016 7.531766 10 4472.1360 8.827367 11
2012 Jan 25
1
solving nls
Hi, I have some data I want to fit with a non-linear function using nls, but it won't solve. > regresjon<-nls(lcfu~lN0+log10(1-(1-10^(k*t))^m), data=cfu_data, > start=(list(lN0 = 7.6, k = -0.08, m = 2))) Error in nls(lcfu ~ lN0 + log10(1 - (1 - 10^(k * t))^m), data = cfu_data, : step factor 0.000488281 reduced below 'minFactor' of 0.000976562 Tried to increase minFactor
2007 Apr 16
1
nls with algorithm = "port", starting values
The documentation for nls says the following about the starting values: start: a named list or named numeric vector of starting estimates. Since R 2.4.0, when 'start' is missing, a very cheap guess for 'start' is tried (if 'algorithm != "plinear"'). It may be a good idea to document that when algorithm = "port", if start is a named
2007 Apr 15
1
nls.control( ) has no influence on nls( ) !
Dear Friends. I tried to use nls.control() to change the 'minFactor' in nls( ), but it does not seem to work. I used nls( ) function and encountered error message "step factor 0.000488281 reduced below 'minFactor' of 0.000976563". I then tried the following: 1) Put "nls.control(minFactor = 1/(4096*128))" inside the brackets of nls, but the same error message
2008 Aug 11
3
Peoblem with nls and try
Hello, I can`t figure out how can increase the velocity of the fitting data by nls. I have a long data .csv I want to read evry time the first colunm to the other colunm and analisy with thata tools setwd("C:/dati") a<-read.table("Normalizzazione.csv", sep=",", dec=".", header=F) for (i in 1:dim(a[[2]]]) { #preparazione dati da analizzare
2009 Mar 12
3
avoiding termination of nls given convergence failure
Hello. I have a script in which I repeatedly fit a nonlinear regression to a series of data sets using nls and the port algorithm from within a loop. The general structure of the loop is: for(i in 1:n){ … extract relevant vectors of dependent and independent variables … … estimate starting values for Amax and Q.LCP…
2005 Nov 21
1
arima prediction
x<-c(-1.873....,-0.121) # 23 numerics; x.arma12 <- armaFit(x ~ arma(1,2)) #estimates y[t]= -0.11465 - 0.23767 y[t-1] - 0.14230 e[t-1] -0.85770 e[t-2] + e[t]; # ? how to predict 46 steps ahead based on 23 data points? # the following doesn't work since n is in armaSim rather than armaFit; predict(x.arima12, n.ahead=46) # Thanks ---------------------------------
2005 Feb 22
3
problems with nonlinear fits using nls
Hello colleagues, I am attempting to determine the nonlinear least-squares estimates of the nonlinear model parameters using nls. I have come across a common problem that R users have reported when I attempt to fit a particular 3-parameter nonlinear function to my dataset: Error in nls(r ~ tlm(a, N.fix, k, theta), data = tlm.data, start = list(a = a.st, : step factor 0.000488281
2007 Aug 04
2
multiple nls - next fit even after convergence problem
Hello R-gurus, I'm trying to adjust different growth curves to a rather extensive dataset. I wrote up a function to go through all of them, but am encountering a problem : among the more than 1000 curves I have, obviously for some of them I encounter conversion problems. I'd like for my function to keep going to the next curve and store the fact that for curve number X I had a convergence
2013 Jan 03
1
nls problem with iterations
Hi, I am using the nls function and it stops because the number of iterations exceeded 50, but i used the nls.control argument to allow for 500 iterations. Do you have any idea why it's not working? fm1 <- nls(npe ~ SSgompertz(npo, Asym, b2, b3), data=f,control=nls.control(maxiter=500)) Thanks for your help, Cheers, Karine.
2006 Aug 15
2
nls convergence problem
I'm having problems getting nls to agree that convergence has occurred in a toy problem. nls.out never gets defined when there is an error in nls. Reaching the maximum number of iterations is alway an error, so nls.out never gets defined when the maximum number of iterations is reched. >From ?nls.control: tol: A positive numeric value specifying the tolerance level for the
2005 Jan 06
1
nls - convergence problem
Dear list, I do have a problem with nls. I use the following data: >test time conc dose 0.50 5.40 1 0.75 11.10 1 1.00 8.40 1 1.25 13.80 1 1.50 15.50 1 1.75 18.00 1 2.00 17.00 1 2.50 13.90 1 3.00 11.20 1 3.50 9.90 1 4.00 4.70 1 5.00 5.00 1 6.00 1.90 1 7.00 1.90 1 9.00 1.10 1 12.00 0.95 1 14.00