[R] nls - Error in qr.qty(QR, resid) : NA/NaN/Inf in foreign function call (arg 1)

2014-07-07 Thread Arpit Jain
Dear All, I have made a script in R (r_nonlinear_leastsquare.R) to fit an exponential decay curve to my data using nls module: - args - commandArgs(trailingOnly = TRUE)

[R] nls() error

2012-04-02 Thread Jeff Breiwick
Hello, I am running a simple nls model (which a friend ran OK) but I get the following error: Error in nls(y ~ R * (1 - (x/K)^2), data = nls.dat, start = list(R = 0.3, : object 'R_nls_iter' not found Does anyone know what the 'R_nls_iter' error is? The data are: x=1:8 ;

Re: [R] nls() error

2012-04-02 Thread Berend Hasselman
On 02-04-2012, at 20:48, Jeff Breiwick wrote: Hello, I am running a simple nls model (which a friend ran OK) but I get the following error: Error in nls(y ~ R * (1 - (x/K)^2), data = nls.dat, start = list(R = 0.3, : object 'R_nls_iter' not found Does anyone know what the

Re: [R] nls() error

2012-04-02 Thread Berend Hasselman
On 02-04-2012, at 21:20, Jeff Breiwick wrote: Thanks for that. Sorry, I did forget to give some basics: You should also reply to the list so that other can follow the thread. I am also sending this the list. Running R-1.15.0 (x64) on Windows 7. I assume you mean R2.15.0 The data I

Re: [R] nls() error

2012-04-02 Thread Jeff Breiwick
Thanks to Berend for his help with this. The problems seems to have been due to an environment that wasn't clean. I also gave x y that were untransformed. But I am able to get results now. Jeff __ R-help@r-project.org mailing list

[R] NLS error

2011-09-20 Thread Diviya Smith
Hello there, I am using NLS for fitting a complex model to some data to estimate a couple of the missing parameters. The model is - y ~ (C+((log(1-r))*exp(-A*d)*(-1+r+exp(d*(A-B)))/(r*(-A*d+d*B+log(1-r) where A, B and C are unknown. In order to test the model, I generate data by setting

Re: [R] NLS error

2011-09-20 Thread Jean V Adams
Diviya Smith wrote on 09/20/2011 01:03:22 PM: Hello there, I am using NLS for fitting a complex model to some data to estimate a couple of the missing parameters. The model is - y ~ (C+((log(1-r))*exp(-A*d)*(-1+r+exp(d*(A-B)))/(r*(-A*d+d*B+log(1-r) where A, B and C are unknown.

Re: [R] NLS error

2011-09-20 Thread Diviya Smith
I dont think *r* is related to the problem. I am not trying to estimate *r* and so basically I am giving the model the correct value of *r* and so log(1-r) should not go to infinity. For test data, I generate data from the same model and add noise (using *r norm*), with the following parameters -

Re: [R] NLS error

2011-09-20 Thread Ben Bolker
Diviya Smith diviya.smith at gmail.com writes: I dont think *r* is related to the problem. I am not trying to estimate *r* and so basically I am giving the model the correct value of *r* and so log(1-r) should not go to infinity. For test data, I generate data from the same model and

Re: [R] NLS error

2011-09-20 Thread Diviya Smith
Also I have this problem that many times the method converges to a local maximum...if I run it a few times, I often get the expected answer. Is there any way to fix this problem by changing the convergence conditions? I have tried changing the nls.control {stats} but hasn't helped much. Any

[R] nls Error Message - Singular Gradient Matrix

2011-06-09 Thread cahulme-lowe
I've been trying to run some analysis using the nls function in R but keep coming up with an error message which I don't understand how to fix. The message follows here: Error in nls(formula = f.p, data = n.data, start = list(S = 1, a = -0.1, : singular gradient In addition: Warning

[R] nls error regarding numerics vs logicals

2010-07-09 Thread Jim Bouldin
I am trying to perform an nls for a valid negative exponential function: zz=nls(y~constant+a.est*2.7183^(b.est*x),start=list(constant=4.0,a.est=-4,b.est = -.005),trace=T) and am getting a number of different error messages, the most problematic of which is Error in nls(ring.area ~ constant +

Re: [R] nls error regarding numerics vs logicals

2010-07-09 Thread Duncan Murdoch
On 09/07/2010 1:51 PM, Jim Bouldin wrote: I am trying to perform an nls for a valid negative exponential function: zz=nls(y~constant+a.est*2.7183^(b.est*x),start=list(constant=4.0,a.est=-4,b.est = -.005),trace=T) and am getting a number of different error messages, the most problematic of

Re: [R] nls error regarding numerics vs logicals

2010-07-09 Thread Jim Bouldin
1. The expression you gave us is clearly not the one that produced the error: it involved ring.area and ba.beg. 2. You don't tell us what x and y are, so we can't reproduce anything. Sorry, I guess that was unclear. I changed the response and independent variable names to y and x

Re: [R] nls error regarding numerics vs logicals

2010-07-09 Thread Duncan Murdoch
On 09/07/2010 2:36 PM, Jim Bouldin wrote: 1. The expression you gave us is clearly not the one that produced the error: it involved ring.area and ba.beg. 2. You don't tell us what x and y are, so we can't reproduce anything. Sorry, I guess that was unclear. I changed the response and

Re: [R] nls error regarding numerics vs logicals

2010-07-09 Thread Peter Ehlers
On 2010-07-09 13:29, Duncan Murdoch wrote: On 09/07/2010 2:36 PM, Jim Bouldin wrote: 1. The expression you gave us is clearly not the one that produced the error: it involved ring.area and ba.beg. 2. You don't tell us what x and y are, so we can't reproduce anything. Sorry, I guess that

Re: [R] nls error message

2009-12-29 Thread Uwe Ligges
Jim Bouldin wrote: When I try to run the following non-linear regression with variables index1 and prl3: beta = 4 nls(index1~beta*(1/prl3),start = list(beta = 4)) I get this error message: Error in nls(index1 ~ beta * (1/prl3), start = list(beta = 4)) : REAL() can only be applied to a

[R] nls error message

2009-12-28 Thread Jim Bouldin
When I try to run the following non-linear regression with variables index1 and prl3: beta = 4 nls(index1~beta*(1/prl3),start = list(beta = 4)) I get this error message: Error in nls(index1 ~ beta * (1/prl3), start = list(beta = 4)) : REAL() can only be applied to a 'numeric', not a