% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cure_models.R
\name{fit_bd_cure}
\alias{fit_bd_cure}
\title{Fit Beta-Danish Cure Models}
\usage{
fit_bd_cure(
  formula_aft,
  formula_cure,
  data,
  type = c("mixture", "promotion"),
  n_starts = 10,
  method = "BFGS"
)
}
\arguments{
\item{formula_aft}{A formula for the latency component (e.g., `Surv(time, status) ~ age`).}

\item{formula_cure}{A one-sided formula for the incidence/cure component (e.g., `~ treatment`).}

\item{data}{A data frame containing the variables.}

\item{type}{Character; either `"mixture"` or `"promotion"`.}

\item{n_starts}{Integer; number of random starts for optimization.}

\item{method}{Optimization method passed to `maxLik`.}
}
\value{
An object of class `bd_cure`.
}
\description{
Fits mixture and promotion-time (non-mixture) cure models using the 
Beta-Danish AFT baseline.
}
\details{
In the **mixture** model, the population is split into susceptible and cured 
fractions. The susceptible probability is modeled via logistic regression: 
`pi = exp(Z %*% gamma) / (1 + exp(Z %*% gamma))`.

In the **promotion-time** (non-mixture) model, the cure fraction is derived 
from a latent Poisson process of clonogenic cells: `theta = exp(Z %*% gamma)`. 
The cure fraction is `exp(-theta)`.
}
