% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/likelihood-multiphase.R
\name{.hzr_optim_multiphase}
\alias{.hzr_optim_multiphase}
\title{Fit a multiphase additive hazard model via maximum likelihood}
\usage{
.hzr_optim_multiphase(
  time,
  status,
  time_lower = NULL,
  time_upper = NULL,
  x = NULL,
  theta_start = NULL,
  weights = NULL,
  control = list(),
  phases,
  formula_global = NULL,
  data = NULL
)
}
\arguments{
\item{time}{Numeric vector of follow-up times.}

\item{status}{Numeric event indicator vector.}

\item{time_lower}{Optional lower bounds for interval censoring.}

\item{time_upper}{Optional upper bounds for left/interval censoring.}

\item{x}{Global design matrix (n x p) or NULL.}

\item{theta_start}{Starting parameter vector (full internal scale).
If NULL, assembled automatically from phase specs.}

\item{control}{Named list of control options.}

\item{phases}{Named list of validated \code{hzr_phase} objects.}

\item{formula_global}{The global formula (used when phases have no
phase-specific formula).}

\item{data}{Data frame containing covariates (needed for phase-specific
formula evaluation).}
}
\value{
List with par (internal scale), value, convergence, vcov, etc.
}
\description{
Assembles starting values from phase specifications, resolves per-phase
design matrices, and delegates to \code{.hzr_optim_generic()}.
}
\keyword{internal}
