derivative {utilityFunctionTools} | R Documentation |
Computes the derivative of a function
Description
Computes the derivative of a function
Usage
derivative(x, coeffs, degree = 1, ndx = 20, deg = 6)
Arguments
x |
the x values for which the derivative should be computed. |
coeffs |
the coefficient. |
degree |
the degree of the derivative. |
ndx |
number of intervals to partition the distance between the lowest and highest x-values of the utility points. |
deg |
degree of the B-spline basis. Determines the degree of the function to be estimated. If deg = 2, the estimated utility function will consist of quadratic functions. |
Value
the derivative of the specified degree.
Examples
coeffs <- seq(0.000002, 1.0, (1.0 - 0.000002) / 25)
x <- seq(0.01, 1.0, (1.0 - 0.01) / 5)
derivative(x, coeffs)
[Package utilityFunctionTools version 0.1.1 Index]