Finite-difference derivatives of G3 phase Phi and phi w.r.t. shape params
Source:R/likelihood-multiphase.R
dot-hzr_g3_phase_derivatives.RdComputes the G3 cumulative intensity, its time derivative, and their partial derivatives with respect to log_tau, gamma, alpha, and eta using central finite differences.
Arguments
- time
Numeric vector of positive times.
- tau
Positive scalar scale parameter.
- gamma
Positive scalar time exponent.
- alpha
Non-negative scalar shape parameter.
- eta
Positive scalar outer exponent.
- h
Finite-difference step (default 1e-5). It is an ABSOLUTE step in
log_tau, and so relative intauonly to first order; a relative step with a1e-10floor forgammaandeta; and strictly proportional foralpha. No caller passes it. Accuracy degrades where the function's natural scale inlog_tau, roughlyalpha / gamma, is far from 1: atalpha = 0.05, gamma = 4thetauderivative is accurate to about 1e-6 rather than the 1e-11 it reaches for ordinary shapes.