% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_survival.R
\name{create_survival_calc}
\alias{create_survival_calc}
\title{Kaplan–Meier Survival Curve (Calculation)}
\usage{
create_survival_calc(
  data,
  time_col,
  event_col,
  hrvar = NULL,
  id_col = "PersonId",
  mingroup = 5,
  na.rm = TRUE
)
}
\arguments{
\item{data}{data.frame.}

\item{time_col}{Character. Time-to-event column name.}

\item{event_col}{Character. Event indicator column name.}

\item{hrvar}{Character or NULL. Grouping column name.}

\item{id_col}{Character. Optional id column name for distinct counts.}

\item{mingroup}{Numeric. Minimum group size.}

\item{na.rm}{Logical. Drop missing values in required columns.}
}
\value{
A list with elements:
\itemize{
\item \code{table}: long survival table with columns (group, time, survival, at_risk, events, n)
\item \code{counts}: group size table
}
}
\description{
Computes a long-format Kaplan–Meier survival table by group and applies a minimum group
size threshold (\code{mingroup}).
}
