Learn R Programming

marqLevAlg (version 1.1)

deriva: Numerical approch to derivate.

Description

The function to return the first, second derivate and the information score matrix. There are the central finite-difference and forward finite-difference will be used.

Usage

deriva(b, funcpa)

Arguments

b

value of parameters to be optimized over.

funcpa

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

Value

v

the information score matrix.

rl

log-likelihood or likelihood of the model.

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

Run this code
# NOT RUN {
b<-0.1
f <- function(b){return((2*b[1]**2+3*b[1]))}

d <- deriva(b=b,funcpa=f)

# }

Run the code above in your browser using DataLab