Skip to content

Commit

Permalink
Move details into @details
Browse files Browse the repository at this point in the history
  • Loading branch information
nanxstats committed Jan 4, 2024
1 parent 9f5cbfc commit 62b941c
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 32 deletions.
44 changes: 25 additions & 19 deletions R/get_analysis_date.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.


#' Derive analysis date for interim/final analysis given multiple conditions.
#' Derive analysis date for interim/final analysis given multiple conditions
#'
#' \describe{
#' \item{Condition 1:}{The planned calendar time for analysis.}
#' \item{Condition 2:}{The targeted events, encompassing both overall population
#' and stratum-specific events.}
#' \item{Condition 3:}{The maximum time extension required to achieve the targeted events.}
#' \item{Condition 4:}{The planned minimum time interval after the previous analysis.}
#' \item{Condition 5:}{The minimum follow-up time needed to reach a certain number of
#' patients in enrollments.}
#' Users have the flexibility to employ all 5 conditions simultaneously or
#' selectively choose specific conditions to determine the analysis date.
#' Any unused conditions will default to `NA` and not affect the output.
#' Regardless of the number of conditions used, the analysis date is determined by
#' min(max(date1, date2, date4, date5, na.rm = TRUE), date3, na.rm = TRUE),
#' where date1, date2, date3, date4, date5 represent the analysis dates determined
#' solely by Condition 1, Condition 2, Condition 3, Condition 4 and Condition 5,
#' respectively.
#' }
#' @param data A simulated data generated by [sim_pw_surv()].
#' @param planned_calendar_time A numerical value specifying the
#' planned calendar time for the analysis.
Expand All @@ -57,6 +39,30 @@
#' minimal follow-up time after specified enrollment fraction in
#' `min_n_overall` or `min_n_per_stratum`.
#'
#' @details
#' To obtain the analysis date, consider the following multiple conditions:
#'
#' \describe{
#' \item{Condition 1}{The planned calendar time for analysis.}
#' \item{Condition 2}{The targeted events, encompassing both overall population
#' and stratum-specific events.}
#' \item{Condition 3}{The maximum time extension required to achieve the
#' targeted events.}
#' \item{Condition 4}{The planned minimum time interval after the
#' previous analysis.}
#' \item{Condition 5}{The minimum follow-up time needed to reach a
#' certain number of patients in enrollments.}
#' }
#'
#' Users have the flexibility to employ all 5 conditions simultaneously or
#' selectively choose specific conditions to determine the analysis date.
#' Any unused conditions will default to `NA` and not affect the output.
#' Regardless of the number of conditions used, the analysis date is determined
#' by `min(max(date1, date2, date4, date5, na.rm = TRUE), date3, na.rm = TRUE)`,
#' where `date1`, `date2`, `date3`, `date4`, `date5` represent the analysis
#' dates determined solely by Condition 1, Condition 2, Condition 3,
#' Condition 4 and Condition 5, respectively.
#'
#' @return A numerical value of the analysis date.
#'
#' @importFrom data.table as.data.table .N
Expand Down
34 changes: 21 additions & 13 deletions man/get_analysis_date.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 62b941c

Please sign in to comment.