Description Usage Arguments Value Examples
View source: R/HigherOrderRiskPreferences.R
Computes the derivative of a function
1 | derivative(x, coeffs, degree = 1, ndx = 20, deg = 6)
|
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. |
the derivative of the specified degree.
1 2 3 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.