[R] optim() error message
Tord Snall
tord.snall at ebc.uu.se
Thu Aug 7 15:46:45 CEST 2003
Dear all,
I've worked with optim before but never encountered this error message:
Nelder-Mead direct search function minimizer
0.23 0Error: subscript out of bounds
The error seems to depend on the initial parameter values. However,
strangely (I think), I recieve this error message when I have given very
good initial values - the values which were returned when I gave worse
values.
An example:
I first give the initial values: a=0.1, g=0
> fit.lognorm$conv
[1] 0
> fit.lognorm$par
[1] 0.2322998 0.1873682
When plotting the deviance (minimized) against the fixed parameter values,
a <- seq(0, 1, l=11)
g <- seq(-0.5, 0.5, l=11)
grid <- expand.grid(a, g)
the found
[1] 0.2322998 0.1873682
are very reasonable.
I then thus run the funciton again with a=0.23, g=0.18,
and recieve the message:
Nelder-Mead direct search function minimizer
0.23 0Error: subscript out of bounds
I've tried increasing maxit (10000), read previous optim function mails and
looked in FAQ, but this problem has not been mentioned.
Thanks in advance for help!
Sincerely,
Tord
Nelder-Mead direct search function minimizer
0.23 0Error: subscript out of bounds
-----------------------------------------------------------------------
Tord Snäll
Avd. f växtekologi, Evolutionsbiologiskt centrum, Uppsala universitet
Dept. of Plant Ecology, Evolutionary Biology Centre, Uppsala University
Villavägen 14
SE-752 36 Uppsala, Sweden
Tel: 018-471 28 82 (int +46 18 471 28 82) (work)
Tel: 018-25 71 33 (int +46 18 25 71 33) (home)
Fax: 018-55 34 19 (int +46 18 55 34 19) (work)
E-mail: Tord.Snall at ebc.uu.se
Check this: http://www.vaxtbio.uu.se/resfold/snall.htm!
More information about the R-help
mailing list