genD.TSestModel {curve} | R Documentation |
Generate a matrix of function derivative information.
## S3 method for class 'TSestModel' genD(func, x=coef(func), method="Richardson", method.args=list(d=0.01, eps=1e-4, r=6, v=2), Shape=TSmodel(func), data=TSdata(func), ...) ## S3 method for class 'ARMA' genD(func, x=coef(func), method="Richardson", method.args=list(d=0.01, eps=1e-4, r=6, v=2), Shape=TSmodel(func), data=TSdata(func), ...) ## S3 method for class 'innov' genD(func, x=coef(func), method="Richardson", method.args=list(d=0.01, eps=1e-4, r=6, v=2), Shape=TSmodel(func), data=TSdata(func), ...)
func |
a TSestModel or TSmodel object which is used as a function mapping coefficients (parameters) to residuals. |
x |
parameter vector first argument to function func indicating the point with respect to which the derivative is calculated. |
method |
string indicating the numerical approximation method. |
method.args |
list with arguments to |
Shape |
a TSmodel in which the parameters should be used. |
data |
TSdata to use in teh evaluation. |
... |
additional arguments passed to |
The derivatives are calculated numerically using Richardson improvement.
A list with three elements as follows: D is a matrix of first(gradients) and second order partial derivatives organized in the same manner as Bates and Watts. (The first p columns are the gradients and the next p(p-1)/2 columns are the lower triangle of the Hessian). p is the dimension of the parameter space=dim of the tangent space. f0 is the function value at the point where the matrix D was calculated.
require("dse") data("eg1.DSE.data.diff", package="dse") model <- estVARXls(TSdata( output=outputData(eg1.DSE.data.diff, series=1:2)), max.lag=2) require("numDeriv") z <- genD(model)