% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rmst-interface.R
\name{rmst.ss}
\alias{rmst.ss}
\title{Sample size estimation for RMST-based models via formula interface}
\usage{
rmst.ss(
  formula,
  data,
  arm,
  target_power,
  L,
  strata = NULL,
  strata_type = c("additive", "multiplicative"),
  dep_cens = FALSE,
  type = c("analytical", "boot"),
  alpha = 0.05,
  n_sim = 1000L,
  parallel.cores = 1L,
  n_start = 50L,
  n_step = 25L,
  max_n = 2000L,
  patience = 5L,
  verbose = FALSE
)
}
\arguments{
\item{formula}{A formula of the form \code{Surv(time, status) ~ cov1 + cov2}.}

\item{data}{A \code{data.frame} containing the reference (pilot) data.}

\item{arm}{Character string naming the treatment arm column (binary 0/1).}

\item{target_power}{Numeric target power (e.g., \code{0.80}).}

\item{L}{Numeric truncation time for RMST.}

\item{strata}{Character column name, one-sided formula (\code{~col}), or \code{NULL}.}

\item{strata_type}{One of \code{"additive"} (default) or \code{"multiplicative"}.}

\item{dep_cens}{Logical; use dependent-censoring model? Default \code{FALSE}.}

\item{type}{One of \code{"analytical"} or \code{"boot"}.}

\item{alpha}{Significance level. Default \code{0.05}.}

\item{n_sim}{Number of bootstrap replicates. Default \code{1000}.}

\item{parallel.cores}{Number of cores for parallel processing. Default \code{1}.}

\item{n_start}{Starting sample size for the search. Default \code{50}.}

\item{n_step}{Search increment. Default \code{25}.}

\item{max_n}{Maximum sample size to try. Default \code{2000}.}

\item{patience}{Number of consecutive non-improving steps before stopping. Default \code{5}.}

\item{verbose}{Logical; if \code{TRUE}, emit progress messages from the underlying calculation.
Default \code{FALSE}.}
}
\value{
An object of class \code{c("rmst_ss", "list")} with elements
\code{results_data}, \code{results_plot}, \code{results_summary},
\code{model_output}, and \code{.meta}.
}
\description{
Routes a formula-based call to the matching RMST sample-size routine.
}
\examples{
data(aft_lognormal_L12_n150, package = "RMSTpowerBoost")
r <- rmst.ss(Surv(time, status) ~ age,
             data         = aft_lognormal_L12_n150,
             arm          = "arm",
             target_power = 0.80,
             L            = 12)
print(r)

}
\seealso{
\code{\link{rmst.power}}, \code{\link{print.rmst_ss}},
\code{\link{summary.rmst_ss}}, \code{\link{plot.rmst_ss}}
}
