[R] nls error regarding numerics vs logicals
Peter Ehlers
ehlers at ucalgary.ca
Fri Jul 9 22:20:59 CEST 2010
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 was unclear. I changed the response and independent
>> variable names to y and x respectively, in hopes that would be clearer.
>> Both are numeric variables.
>
> When I make up my own numeric variables I don't get the error you got.
> So I still can't reproduce anything.
>
> Duncan Murdoch
>
Two possibilities, although neither of them caused problems
for me with made-up data:
1. do you have T defined as some object?
If so, remove it or (better) use TRUE.
2. did you put 'trace=T' inside your start list?
Also, it seems that you might want a model of the type
y ~ A * ( 1 - exp( B * x) )
which would be a bit simpler.
-Peter Ehlers
More information about the R-help
mailing list