Description Usage Arguments Details Value See Also Examples
numDerivLogf
/numDeriv2Logf
builds a function that evaluates to the first/second derivative of log(f(y, theta, ...))
with respect to theta[[i]]
/theta[[i]]
and theta[[j]]
.
1 2 3 4 5 6 7 |
f |
|
isLogf |
set to |
logZero |
the value |
logInf |
the value |
method, side, method.args |
see |
numDeriv produces NaN
s if the log evaluates to (negative) Inf
so you may want to specify logZero
and logInf
.
numDerivLogf
passes method
, side
and method.args
directly to numDeriv::grad
.
numDeriv2Logf
duplicates the internals of numDeriv::hessian
to gain speed.
The defaults for method.args
are list(eps=1e-4, d=0.1, zero.tol=sqrt(.Machine$double.eps/7e-7), r=4, v=2)
.
numDerivLogf
returns function(y, theta, i, ...)
which evaluates to the first derivative of log(f(y, theta, ...))
with respect to theta[[i]]
.
numDeriv2Logf
returns function(y, theta, i, j, ...)
which evaluates to the second derivative of log(f(y, theta, ...))
with respect to theta[[i]]
and theta[[j]]
.
grad
and hessian
in package numDeriv, buildf
, DerivLogf
, fisherI
1 | ## see examples for param
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.