Re: [R] nls.control( ) has no influence on nls( ) !

2007-04-16 Thread Joerg van den Hoff
On Mon, Apr 16, 2007 at 09:03:27AM +0200, Martin Maechler wrote:
> > "Yuchen" == Yuchen Luo <[EMAIL PROTECTED]>
> > on Sun, 15 Apr 2007 12:18:23 -0700 writes:
> 
> Yuchen> Dear Friends.
> Yuchen> I tried to use nls.control() to change the 'minFactor' in nls( ), 
> but it
> Yuchen> does not seem to work.
> 
> yes, you do not seem to use it correctly.
> No reason to jump to the conclusion that you give in the subject
> of this posting ... which is hilariously wrong!
> You don't really think that a quality software like R has had nls()
> and nls.control(), and nls.control() would never have worked for all
> those years and tens of thousands of users ???
> Please get to your senses, and first read the posting guide (*)
> - and then try again, so we can help you further!
> 
> Regards,
> Martin Maechler, ETH Zurich
> 
> Yuchen> I used nls( ) function and encountered error message "step factor
> Yuchen> 0.000488281 reduced below 'minFactor' of 0.000976563". I then 
> tried the
> Yuchen> following:
> 
> Yuchen> 1) Put "nls.control(minFactor = 1/(4096*128))" inside the 
> brackets of nls,
> Yuchen> but the same error message shows up.
> 
> Yuchen> 2) Put "nls.control(minFactor = 1/(4096*128))" as a separate 
> command before
> Yuchen> the command that use nls( ) function, again, the same thing 
> happens,
> Yuchen> although the R responds to the nls.control( ) function 
> immediately:

you need to provide a list for the `control' argument of `nls',  i.e. you need
to use something like:

nls(other_arguments, control = nls.control(minFactor = 1/4096))

nls.control() only helps in so far, as that it always returns the complete list
of three components needed for the `control' argument of `nls'. you can equally
well use an explicit list instead.


> Yuchen> -
> Yuchen> $maxiter
> 
> Yuchen> [1] 50
> 
> 
> 
> Yuchen> $tol
> 
> Yuchen> [1] 1e-05
> 
> 
> 
> Yuchen> $minFactor
> 
> Yuchen> [1] 1.907349e-06
> 
> Yuchen> --
> 
> 
> Yuchen> I am wondering how may I change the minFactor to a smaller value? 
> The manual
> Yuchen> that comes with the R software about nls( )  is very sketchy --- 
> the only
> Yuchen> relevant example I see is a separate command like 2).
> 
> Yuchen> A more relevent question might be, is lower the 'minFactor'  the 
> only
> Yuchen> solution to the problem? What are the other options?

check your model?
check your data?
change start values ("wrong" minimum)?
use another algorithm (cf. nls manpage)?

> 
> Yuchen> Best Wishes
> Yuchen> Yuchen Luo

a final remark (off-topic?), concerning the response of m. maechler (but I
notice this attitude continously on the list): this is supposed to be a help
list, neither a boot camp nor a thought-police school, right?. 
concerning the question at hand, the one word response

`?nls'

would have been justifiable (it usually _is_ in the manpage), if not overly
helpful, probably. but the actual response is worded such that --
would it be directed at me -- I would judge it simply offensive: "get to your
senses" is not what one should be told, simply because ond did not grasp how to
use the `control' argument and/or because in the subject (contrary to the body) 
of
the mail 'has no influence' is used instead of `seems to have no influence'.

I really do think that if someone deems a certain question really stupid, it
would be wise simply to keep 'radio silence' (i.e. ignore it), which probably
is the best corrective anyway. the 'how dare you' responses are annoying, to
say the least.

for heavens sake...

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] nls.control( ) has no influence on nls( ) !

2007-04-16 Thread Martin Maechler
> "Yuchen" == Yuchen Luo <[EMAIL PROTECTED]>
> on Sun, 15 Apr 2007 12:18:23 -0700 writes:

Yuchen> Dear Friends.
Yuchen> I tried to use nls.control() to change the 'minFactor' in nls( ), 
but it
Yuchen> does not seem to work.

yes, you do not seem to use it correctly.
No reason to jump to the conclusion that you give in the subject
of this posting ... which is hilariously wrong!
You don't really think that a quality software like R has had nls()
and nls.control(), and nls.control() would never have worked for all
those years and tens of thousands of users ???
Please get to your senses, and first read the posting guide (*)
- and then try again, so we can help you further!

Regards,
Martin Maechler, ETH Zurich

(*) Link at the bottom of every R-help message -- and hence
cited below

Yuchen> I used nls( ) function and encountered error message "step factor
Yuchen> 0.000488281 reduced below 'minFactor' of 0.000976563". I then tried 
the
Yuchen> following:

Yuchen> 1) Put "nls.control(minFactor = 1/(4096*128))" inside the brackets 
of nls,
Yuchen> but the same error message shows up.

Yuchen> 2) Put "nls.control(minFactor = 1/(4096*128))" as a separate 
command before
Yuchen> the command that use nls( ) function, again, the same thing happens,
Yuchen> although the R responds to the nls.control( ) function immediately:
Yuchen> -
Yuchen> $maxiter

Yuchen> [1] 50



Yuchen> $tol

Yuchen> [1] 1e-05



Yuchen> $minFactor

Yuchen> [1] 1.907349e-06

Yuchen> --


Yuchen> I am wondering how may I change the minFactor to a smaller value? 
The manual
Yuchen> that comes with the R software about nls( )  is very sketchy --- 
the only
Yuchen> relevant example I see is a separate command like 2).

Yuchen> A more relevent question might be, is lower the 'minFactor'  the 
only
Yuchen> solution to the problem? What are the other options?

Yuchen> Best Wishes
Yuchen> Yuchen Luo

Yuchen> [[alternative HTML version deleted]]

Yuchen> __
Yuchen> R-help@stat.math.ethz.ch mailing list
Yuchen> https://stat.ethz.ch/mailman/listinfo/r-help
Yuchen> PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html
Yuchen> and provide commented, minimal, self-contained, reproducible code.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] nls.control( ) has no influence on nls( ) !

2007-04-15 Thread Yuchen Luo
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 shows up.

2) Put "nls.control(minFactor = 1/(4096*128))" as a separate command before
the command that use nls( ) function, again, the same thing happens,
although the R responds to the nls.control( ) function immediately:
 -
$maxiter

[1] 50



$tol

[1] 1e-05



$minFactor

[1] 1.907349e-06

--


I am wondering how may I change the minFactor to a smaller value? The manual
that comes with the R software about nls( )  is very sketchy --- the only
relevant example I see is a separate command like 2).

A more relevent question might be, is lower the 'minFactor'  the only
solution to the problem? What are the other options?

Best Wishes
Yuchen Luo

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.