% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rmst-interface.R
\name{rmst.power}
\alias{rmst.power}
\title{Power analysis for RMST-based models via formula interface}
\usage{
rmst.power(
  formula,
  data,
  arm,
  sample_sizes,
  L,
  strata = NULL,
  strata_type = c("additive", "multiplicative"),
  dep_cens = FALSE,
  type = c("analytical", "boot"),
  alpha = 0.05,
  n_sim = 1000L,
  parallel.cores = 1L,
  verbose = FALSE
)
}
\arguments{
\item{formula}{A formula of the form \code{Surv(time, status) ~ cov1 + cov2}.
Use \code{s()} wrapping (mgcv style) for smooth terms: \code{Surv(time, status) ~ s(age)}.}

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

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

\item{sample_sizes}{Integer vector of per-arm (or per-stratum) sample sizes to evaluate.}

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

\item{strata}{Character column name, one-sided formula (\code{~col}), or \code{NULL}
(default). Ignored when \code{dep_cens = TRUE}.}

\item{strata_type}{One of \code{"additive"} (default) or \code{"multiplicative"}.
Only used when \code{strata} is non-\code{NULL} and \code{dep_cens = FALSE}.}

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

\item{type}{One of \code{"analytical"} or \code{"boot"}. Auto-switched with a message
when the requested type is unavailable for the chosen model.}

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

\item{n_sim}{Number of bootstrap replicates (boot methods only). Default \code{1000}.}

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

\item{verbose}{Logical; if \code{TRUE}, emit progress messages from the underlying calculation.
Default \code{FALSE}.}
}
\value{
An object of class \code{c("rmst_power", "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 power routine.
}
\examples{
data(aft_lognormal_L12_n150, package = "RMSTpowerBoost")
r <- rmst.power(Surv(time, status) ~ age,
                data = aft_lognormal_L12_n150,
                arm  = "arm",
                sample_sizes = c(50, 100, 150),
                L    = 12)
print(r)
s <- summary(r)
plot(r)

}
\seealso{
\code{\link{rmst.ss}}, \code{\link{print.rmst_power}},
\code{\link{summary.rmst_power}}, \code{\link{plot.rmst_power}}
}
