deriva: Numerical derivatives

View source: R/deriva.R

derivaR Documentation

Numerical derivatives

Description

The function computes the first derivates and the information score matrix. Central finite-differences and forward finite-differences are used for the first and second derivatives respectively.

Usage

deriva(nproc = 1, b, funcpa, .packages = NULL, .export = NULL, ...)

Arguments

nproc

number of processors for parallel computing

b

value of parameters to be optimized over

funcpa

function to be minimized (or maximized), with argument the vector of parameters over which minimization isto take place. It should return a scalar result.

.packages

character vector of packages that funcpa depends on

.export

character vector of objects/functions that funcpa depends on

...

other arguments of the funcpa function

Value

v

vector containing the upper part of the information score matrix and the first derivatives

rl

the value of the funcpa function at point b

Author(s)

Viviane Philipps, Boris Hejblum, Cecile Proust-Lima, Daniel Commenges

References

Donald W. Marquardt An algorithm for Least-Squares Estimation of Nonlinear Parameters. Journal of the Society for Industrial and Applied Mathematics, Vol. 11, No. 2. (Jun, 1963), pp. 431-441.

Examples

b <- 0.1
f <- function(b){return((2*b[1]**2+3*b[1]))}
d <- deriva(b=b,funcpa=f)


VivianePhilipps/marqLevAlgParallel documentation built on Oct. 18, 2023, 2:16 p.m.