% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/decomposition.R
\name{.hzr_phase_derivatives}
\alias{.hzr_phase_derivatives}
\title{Derivatives of phase cumulative and instantaneous hazard w.r.t. shape params}
\usage{
.hzr_phase_derivatives(
  time,
  t_half,
  nu,
  m,
  type = c("cdf", "hazard", "constant")
)
}
\arguments{
\item{time}{Numeric vector of positive times.}

\item{t_half}{Positive scalar half-life.}

\item{nu}{Numeric scalar time exponent.}

\item{m}{Numeric scalar shape exponent.}

\item{type}{Phase type: \code{"cdf"}, \code{"hazard"}, or \code{"constant"}.}
}
\value{
Named list:
\describe{
\item{Phi}{Cumulative hazard contribution \eqn{\Phi(t)}.}
\item{phi}{Instantaneous hazard contribution \eqn{\phi(t) = d\Phi/dt}.}
\item{dPhi_dlog_thalf}{\eqn{d\Phi / d(\log t_{1/2})}.}
\item{dPhi_dnu}{\eqn{d\Phi / d\nu}.}
\item{dPhi_dm}{\eqn{d\Phi / dm}.}
\item{dphi_dlog_thalf}{\eqn{d\phi / d(\log t_{1/2})}.}
\item{dphi_dnu}{\eqn{d\phi / d\nu}.}
\item{dphi_dm}{\eqn{d\phi / dm}.}
}
}
\description{
Computes \eqn{\Phi_j(t)}, \eqn{\phi_j(t)}, and their derivatives with
respect to \code{t_half}, \code{nu}, and \code{m} using central finite differences on
\code{\link[=hzr_decompos]{hzr_decompos()}}.  The \code{log_t_half} derivative is obtained via the chain
rule: \eqn{d\Phi/d(\log t_{1/2}) = t_{1/2} \cdot d\Phi/dt_{1/2}}.
}
\keyword{internal}
