% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gen_data.R
\name{gen_competing_risks}
\alias{gen_competing_risks}
\title{Generate Data for Competing Risks Analysis}
\usage{
gen_competing_risks(
  pdf1,
  cdf1,
  pdf2,
  cdf2,
  lower = 0,
  upper = Inf,
  n,
  censoring_type = c("type1_hybrid", "type2_hybrid", "prog_hybrid"),
  r = NULL,
  T_star = NULL,
  R_plan = NULL,
  seed = NULL
)
}
\arguments{
\item{pdf1}{Density function for Cause 1.}

\item{cdf1}{Cumulative distribution function for Cause 1.}

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

\item{cdf2}{Cumulative distribution function for Cause 2.}

\item{lower}{Lower bound of support.}

\item{upper}{Upper bound of support.}

\item{n}{Total sample size.}

\item{censoring_type}{Type of censoring ("type1_hybrid", "type2_hybrid", "prog_hybrid").}

\item{r}{Number of failures required.}

\item{T_star}{Time limit.}

\item{R_plan}{Progressive plan (if applicable).}

\item{seed}{Optional random seed.}
}
\value{
A list containing observed failure times, causes of failure (1 or 2), and censoring flags.
}
\description{
Generate Data for Competing Risks Analysis
}
\examples{
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
)
}
