View source: R/LikelihoodApproximation.R
hermiteInterpolation | R Documentation |
Cubic Hermite interpolation using both values and gradients to approximate a log likelihood function
hermiteInterpolation(x, profile)
x |
The log(hazard ratio) for which to approximate the log likelihood. |
profile |
A profile as created with |
Performs spline interpolation using cubic Hermite polynomials (Catmull et al. 1974) between the points specified in the profile. We use linear extrapolation outside the points.
The approximate log likelihood for the given x.
Catmull, Edwin; Rom, Raphael (1974), "A class of local interpolating splines", in Barnhill, R. E.; Riesenfeld, R. F. (eds.), Computer Aided Geometric Design, New York: Academic Press, pp. 317–326
profile <- data.frame(point = c(1.1, 2.1), value = c(1, 1), derivative = c(0.1, -0.1))
hermiteInterpolation(x = 0:3, profile = profile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.