similar to: nls.control( ) has no influence on nls( ) !

Displaying 20 results from an estimated 2000 matches similar to: "nls.control( ) has no influence on nls( ) !"

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
2007 Aug 12
1
How to store the parameter estimated by nls( ) to a variable?
Dear Colleagues. I believe this should be a problem encountered by many: nls( ) is a very useful and efficient function to use if we are just to display the estimated value on screen. What if we need R to store the estimated parameter in a variable? For example: x=rnorm(10, mean=1000, sd=10) y=x^2+100+rnorm(10) a=nls(y~(x^2+para),control=list(maxiter = 1000, minFactor=0.5
2012 Apr 17
3
error using nls with logistic derivative
Hi I?m trying to fit a nonlinear model to a derivative of the logistic function y = a/(1+exp((b-x)/c)) (this is the parametrization for the SSlogis function with nls) The derivative calculated with D function is: > logis<- expression(a/(1+exp((b-x)/c))) > D(logis, "x") a * (exp((b - x)/c) * (1/c))/(1 + exp((b - x)/c))^2 So I enter this expression in the nls function:
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
2003 Aug 28
3
(no subject)
Dear All, A couple of questions about the nls package. 1. I'm trying to run a nonlinear least squares regression but the routine gives me the following error message: step factor 0.000488281 reduced below `minFactor' of 0.000976563 even though I previously wrote the following command: nls.control(minFactor = 1/4096), which should set the minFactor to a lower level than the default
2011 Mar 28
1
error in nls, step factor reduced below minFactor
Hello, I've seen various threads on people reporting: step factor 0.000488281 reduced below `minFactor' of 0.000976563 While I know how to set the minFactor, what I'd like to have happen is for nls to return to me, the last or closest fitted parameters before it errors out. In other words, so I don't get convergence, I'd still like to acquire the values of the parameters
2008 Apr 10
1
(no subject)
Subject: nls, step factor 0.000488281 reduced below 'minFactor' of 0.000976563 Hi there, I'm trying to conduct nls regression using roughly the below code: nls1 <- nls(y ~ a*(1-exp(-b*x^c)), start=list(a=a1,b=b1,c=c1)) I checked my start values by plotting the relationship etc. but I kept getting an error message saying maximum iterations exceeded. I have tried changing these
2007 Aug 13
2
How to write to a table column by column?
Dear friends. Every loop of my program will result in a list that is very long, with a structure similar to the one below: Lst <- list(name="Fred", wife="Mary", daily.incomes=c(1:850)) Please notice the large size of "daily.incomes". I need to store all such lists in a csv file so that I can easily view them in Excel. Excel cannot display a row of more than 300
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 of
2007 Aug 03
2
Saving an expression to a file
Dear Friends. I have a very long expression and I use function D to find its derivative, which will be even longer. I save the resulting expression in a variavle, say bbb. But when I tried to display bbb on the screen, the R screen is not long enough for me to view it. Is there a way to save the expression to a file? Best Wishes Yuchen Luo [[alternative HTML version deleted]]
2002 Apr 23
1
Use of nls command
Hello. I am trying to do a non-linear fit using the 'nls' command. The data that I'm using is as follows pH k 1 3.79 34.21 2 4.14 25.85 3 4.38 20.45 4 4.57 15.61 5 4.74 12.42 6 4.92 9.64 7 5.11 7.30 8 5.35 5.15 9 5.67 3.24 with a transformation of pH to H <- 10^-pH When using the nls command for a set of parameters - a, b and c, I receive two sets of errors: >
2007 Jun 21
4
"if" within a function
Dear Friends. I found a puzzling phenomenon in R when you use 'if' within a function: # defining a function aaa aaa=function(a) {if (a==1) {aaa=1}; if (a!=1) {aaa=2} } # using the function: > b=20 > bbb=aaa(b) > bbb [1] 2 > typeof(bbb) [1] "double" > > > c=1 > ccc=aaa(c) > ccc NULL > typeof(ccc) [1] "NULL" It seems that only the last
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
2005 Apr 23
1
start values for nls() that don't yield singular gradients?
I'm trying to fit a Gompertz sigmoid as follows: x <- c(15, 16, 17, 18, 19) # arbitrary example data here; y <- c(0.1, 1.8, 2.2, 2.6, 2.9) # actual data is similar gm <- nls(y ~ a+b*exp(-exp(-c*(x-d))), start=c(a=?, b=?, c=?, d=?)) I have been unable to properly set the starting value '?'s. All of my guesses yield either a "singular gradient" error if they
2007 Jun 23
3
Setting up a blank table with column names in the hard drive
Dear Friends. Greetings! This should be a very common operation and I believe there should be a nice way in R to handle it. I couldn't find it in the manual or by searching on line. I am wondering if I could ask for some help in this community. I am trying to record the results of my program to a csv file in the hard drive so as to save memory space and also to read the results in excel
2008 Sep 02
2
nls.control()
All - I have data: TL age 388 4 418 4 438 4 428 5 539 10 432 4 444 7 421 4 438 4 419 4 463 6 423 4 ... [truncated] and I'm trying to fit a simple Von Bertalanffy growth curve with program: #Creates a Von Bertalanffy growth model VonB=nls(TL~Linf*(1-exp(-k*(age-t0))), data=box5.4, start=list(Linf=1000, k=0.1, t0=0.1), trace=TRUE) #Scatterplot of the data plot(TL~age, data=box5.4,
2009 Oct 02
1
nls not accepting control parameter?
Hi I want to change a control parameter for an nls () as I am getting an error message "step factor 0.000488281 reduced below 'minFactor' of 0.000976562". Despite all tries, it seems that the control parameter of the nls, does not seem to get handed down to the function itself, or the error message is using a different one. Below system info and an example highlighting the
2004 Mar 18
1
profile error on an nls object
Hello all, This is the error message that I get. > hyp.res <- nls(log(y)~log(pdf.hyperb(theta,X)), data=dataModel, + start=list(theta=thetaE0), + trace=TRUE) 45.54325 : 0.1000000 1.3862944 -4.5577142 0.0005503 3.728302 : 0.0583857346 0.4757772859 -4.9156128701 0.0005563154 1.584317 : 0.0194149477 0.3444648833 -4.9365149150 0.0004105426 1.569333 :
2007 Aug 29
4
How to signal the end of the table?
I am using a "for" loop to read a table row by row and I have to specify how many records are there in the table. I need to read row by row because the table is huge and the memory not large enough for the whole table.: number.of.records=100 fp=file("abc.csv","r") pos=seek(fp, rw="read") for (i in 1:number.of.record){ current.row=scan(file=fp,
2008 Apr 14
3
Logistic regression
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