Learn R Programming

OptimModel (version 2.0-1)

f2djac: Compute derivative with respect to parameters

Description

Compute derivative with respect to parameters.

Usage

f2djac(Func, theta, ...)

Value

Returns an n x p matrix of derivatives with respect to theta. Computes \( \frac{\delta \, Func( \theta, ...)}{ \delta \, \theta}\), where \(\theta\) = theta

Arguments

Func

A function with theta as first argument that returns an n x 1 vector, where n represents the number of observations.

theta

A p x 1 vector of parameters.

...

Other arguments needed for function.

Author

Steven Novick

See Also

optim_fit, rout_fitter

Examples

Run this code
    f = function(theta, x){ theta[1] + (theta[2]-theta[1])/(1 + (x/theta[3])^theta[4]) }
    theta0 = c(0, 100, .5, 2)
    x = 0:10
    f2djac(f, theta0, x=x)

Run the code above in your browser using DataLab