[Rd] optim bug (PR#9684)
christina.merz at gmx.de
christina.merz at gmx.de
Mon May 14 20:11:24 CEST 2007
Full_Name: Christina Merz
Version: R version 2.5.0 (2007-04-23)
OS: mingw32
Submission from: (NULL) (213.70.209.132)
R> version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor 5.0
year 2007
month 04
day 23
svn rev 41293
language R
version.string R version 2.5.0 (2007-04-23)
-----------------------------------------------------------------------------
R> sessionInfo()
R version 2.5.0 (2007-04-23)
i386-pc-mingw32
locale:
LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252
attached base packages:
[1] "stats" "graphics" "grDevices" "utils" "datasets" "methods"
[7] "base"
-------------------------------------------------------------------------------
'optim' does not accept arguments called 'u'. Here is an example:
R> fun<-function(x,u) (x-u)^2
R> optim(7,fn=fun,u=9)
Fehler in fn(par, ...) : Argument "u" fehlt (ohne Standardwert)
Zusätzlich: Warning message:
bounds can only be used with method L-BFGS-B in: optim(7, fn = fun, u = 9)
while
R> fun<-function(x,y) (x-y)^2
R> optim(7,fn=fun,y=9)
$par
[1] 8.999854
$value
[1] 2.145767e-08
$counts
function gradient
28 NA
$convergence
[1] 0
$message
NULL
Warning message:
one-diml optimization by Nelder-Mead is unreliable: use optimize in: optim(7, fn
= fun, y = 9)
-Christina
More information about the R-devel
mailing list