% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mle_est.R
\name{mle_competing_risks}
\alias{mle_competing_risks}
\title{Maximum Likelihood Estimation for Competing Risks Analysis}
\usage{
mle_competing_risks(data, pdf1, cdf1, pdf2, cdf2, init_par, method = "BFGS")
}
\arguments{
\item{data}{Object of class \code{comp_risk_rel_data} generated by \code{gen_competing_risks}.}

\item{pdf1}{Density function for Cause 1.}

\item{cdf1}{CDF function for Cause 1.}

\item{pdf2}{Density function for Cause 2.}

\item{cdf2}{CDF function for Cause 2.}

\item{init_par}{Vector of initial parameter values for both causes c(theta1, theta2).}

\item{method}{Optimization method.}
}
\value{
S3 object of class \code{mle_fit}.
}
\description{
Maximum Likelihood Estimation for Competing Risks Analysis
}
\examples{
dat <- gen_competing_risks(
  pdf1 = function(x) dexp(x, rate = 1),
  cdf1 = function(x) pexp(x, rate = 1),
  pdf2 = function(x) dexp(x, rate = 1.5),
  cdf2 = function(x) pexp(x, rate = 1.5),
  lower = 0, upper = 10, n = 25,
  censoring_type = "type1_hybrid",
  r = 15, T_star = 1.0, seed = 123
)
mle_competing_risks(
  data = dat,
  pdf1 = function(x, th) dexp(x, rate = th[1]),
  cdf1 = function(x, th) pexp(x, rate = th[1]),
  pdf2 = function(x, th) dexp(x, rate = th[2]),
  cdf2 = function(x, th) pexp(x, rate = th[2]),
  init_par = c(0.8, 1.2), method = "BFGS"
)
}
