hermiteInterpolation: Cubic Hermite interpolation using both values and gradients...

View source: R/LikelihoodApproximation.R

hermiteInterpolationR Documentation

Cubic Hermite interpolation using both values and gradients to approximate a log likelihood function

Description

Cubic Hermite interpolation using both values and gradients to approximate a log likelihood function

Usage

hermiteInterpolation(x, profile)

Arguments

x

The log(hazard ratio) for which to approximate the log likelihood.

profile

A profile as created with approximateLikelihood() with approximation = "grid with gradients". This is a data frame with 3 columns: point, value, and derivative, sorted by point.

Details

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.

Value

The approximate log likelihood for the given x.

References

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

Examples

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)


EvidenceSynthesis documentation built on Aug. 26, 2025, 9:08 a.m.