| Line 64... |
Line 64... |
| 64 |
values. This can help detect incorrectly formulated gradients or
|
64 |
values. This can help detect incorrectly formulated gradients or
|
| 65 |
Hessians.}
|
65 |
Hessians.}
|
| 66 |
}
|
66 |
}
|
| 67 |
\details{
|
67 |
\details{
|
| 68 |
Note that arguments after \code{\dots} must be matched exactly.
|
68 |
Note that arguments after \code{\dots} must be matched exactly.
|
| 69 |
|
69 |
|
| 70 |
If a gradient or hessian is supplied but evaluates to the wrong mode
|
70 |
If a gradient or hessian is supplied but evaluates to the wrong mode
|
| 71 |
or length, it will be ignored if \code{check.analyticals = TRUE} (the
|
71 |
or length, it will be ignored if \code{check.analyticals = TRUE} (the
|
| 72 |
default) with a warning. The hessian is not even checked unless the
|
72 |
default) with a warning. The hessian is not even checked unless the
|
| 73 |
gradient is present and passes the sanity checks.
|
73 |
gradient is present and passes the sanity checks.
|
| 74 |
|
74 |
|
| Line 76... |
Line 76... |
| 76 |
method \dQuote{1} which is line search.
|
76 |
method \dQuote{1} which is line search.
|
| 77 |
|
77 |
|
| 78 |
The functions supplied should always return finite (including not
|
78 |
The functions supplied should always return finite (including not
|
| 79 |
\code{NA} and not \code{NaN}) values: for the function value itself
|
79 |
\code{NA} and not \code{NaN}) values: for the function value itself
|
| 80 |
non-finite values are replaced by the maximum positive value with a warning.
|
80 |
non-finite values are replaced by the maximum positive value with a warning.
|
| 81 |
|
81 |
|
| 82 |
The parameter vector passed to \code{f} and \code{hessian} has special
|
82 |
The parameter vector passed to \code{f} and \code{hessian} has special
|
| 83 |
semantics and is shared between calls. The functions should not copy it.
|
83 |
semantics and is shared between calls. The functions should not copy it.
|
| 84 |
}
|
84 |
}
|
| 85 |
\value{
|
85 |
\value{
|
| 86 |
A list containing the following components:
|
86 |
A list containing the following components:
|
| Line 122... |
Line 122... |
| 122 |
system of algorithms for unconstrained minimization.
|
122 |
system of algorithms for unconstrained minimization.
|
| 123 |
\emph{ACM Trans. Math. Software}, \bold{11}, 419--440.
|
123 |
\emph{ACM Trans. Math. Software}, \bold{11}, 419--440.
|
| 124 |
}
|
124 |
}
|
| 125 |
\seealso{
|
125 |
\seealso{
|
| 126 |
\code{\link{optim}} and \code{\link{nlminb}}.
|
126 |
\code{\link{optim}} and \code{\link{nlminb}}.
|
| 127 |
|
127 |
|
| 128 |
\code{\link{constrOptim}} for constrained optimization,
|
128 |
\code{\link{constrOptim}} for constrained optimization,
|
| 129 |
\code{\link{optimize}} for one-dimensional
|
129 |
\code{\link{optimize}} for one-dimensional
|
| 130 |
minimization and \code{\link{uniroot}} for root finding.
|
130 |
minimization and \code{\link{uniroot}} for root finding.
|
| 131 |
\code{\link{deriv}} to calculate analytical derivatives.
|
131 |
\code{\link{deriv}} to calculate analytical derivatives.
|
| 132 |
|
132 |
|
| 133 |
For nonlinear regression, \code{\link{nls}} may be better.
|
133 |
For nonlinear regression, \code{\link{nls}} may be better.
|