% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/competing_risks.R
\name{fit_bd_competing}
\alias{fit_bd_competing}
\title{Fit Beta-Danish Competing Risks Model}
\usage{
fit_bd_competing(time, cause, n_starts = 5, method = "BFGS")
}
\arguments{
\item{time}{Numeric vector of observed times.}

\item{cause}{Integer vector of event causes. `0` indicates right-censored,
and `1, 2, ..., m` indicate specific event causes.}

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

\item{method}{Optimization method passed to `maxLik`.}
}
\value{
An object of class `bd_competing`.
}
\description{
Fits a parametric competing risks model assuming independent latent failure
times, where each cause-specific baseline follows a 4-parameter Beta-Danish
distribution.
}
\details{
Under the assumption of independent latent failure times, the joint likelihood
factorizes. The function first fits independent Beta-Danish models for each
cause (treating other causes as censored) to find robust starting values,
then optimizes the joint likelihood.
}
