vpgrad: An interface to numDeriv::grad for numerical gradients over...

Description Usage Arguments Examples

Description

Same as vpoptim, pretty much. See examples

Usage

1
vpgrad(fun, x, ...)

Arguments

fun

function to differentiate (the names of the arguments should be the *same ones* as in the "guess" argument)

x

compute gradient at x

...

passed on to grad

Examples

1
2
3
4
#gradient of a function of two arguments
vpgrad(function(x,y) x+y,list(x=1,y=3))
#gradient of a matrix function, returned as a matrix
vpgrad(det,diag(2))

dahtah/vecpack documentation built on May 14, 2019, 3:27 p.m.