diff --git a/R/wlr.R b/R/wlr.R index 8c459daa..9d2087f7 100644 --- a/R/wlr.R +++ b/R/wlr.R @@ -25,6 +25,17 @@ #' @param return_variance A logical flag that, if `TRUE`, adds columns #' estimated variance for weighted sum of observed minus expected; #' see details; Default: `FALSE`. +#' @param ratio randomization ratio (experimental:control). +#' - If the `data` is generated by simtrial, such as +#' + `data = sim_pw_surv(...) |> cut_data_by_date(...)` +#' + `data = sim_pw_surv(...) |> cut_data_by_event(...)` +#' + `data = sim_pw_surv(...) |> cut_data_by_date(...) |> counting_process(...)` +#' + `data = sim_pw_surv(...) |> cut_data_by_event(...) |> counting_process(...)` +#' there is no need to input the `ratio`, as simtrial gets the `ratio` via the +#' `block` arguments in [sim_pw_surv()]. +#' - If the `data` is a custom dataset (see Example 2) below, +#' + Users are suggested to input the planned randomization ratio to `ratio`; +#' + If not, simtrial takes the empirical randomization ratio. #' #' @return A list containing the test method (`method`), #' parameters of this test method (`parameter`), diff --git a/man/wlr.Rd b/man/wlr.Rd index b9249cee..163f8ed9 100644 --- a/man/wlr.Rd +++ b/man/wlr.Rd @@ -22,6 +22,24 @@ wlr(data, weight, return_variance = FALSE, ratio = NULL) \item{return_variance}{A logical flag that, if \code{TRUE}, adds columns estimated variance for weighted sum of observed minus expected; see details; Default: \code{FALSE}.} + +\item{ratio}{randomization ratio (experimental:control). +\itemize{ +\item If the \code{data} is generated by simtrial, such as +\itemize{ +\item \code{data = sim_pw_surv(...) |> cut_data_by_date(...)} +\item \code{data = sim_pw_surv(...) |> cut_data_by_event(...)} +\item \code{data = sim_pw_surv(...) |> cut_data_by_date(...) |> counting_process(...)} +\item \code{data = sim_pw_surv(...) |> cut_data_by_event(...) |> counting_process(...)} +there is no need to input the \code{ratio}, as simtrial gets the \code{ratio} via the +\code{block} arguments in \code{\link[=sim_pw_surv]{sim_pw_surv()}}. +} +\item If the \code{data} is a custom dataset (see Example 2) below, +\itemize{ +\item Users are suggested to input the planned randomization ratio to \code{ratio}; +\item If not, simtrial takes the empirical randomization ratio. +} +}} } \value{ A list containing the test method (\code{method}),