Skip to content

Commit

Permalink
Merge pull request #103 from Merck/102-combine-wlr-and-tenfhcorr
Browse files Browse the repository at this point in the history
delete `tenFHcorr` and merge it into `wlr`
  • Loading branch information
nanxstats committed Jun 1, 2023
2 parents c324175 + 0da7d07 commit b4aeaa7
Show file tree
Hide file tree
Showing 20 changed files with 300 additions and 360 deletions.
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export(rpwexpinvRcpp)
export(sim_fixed_n)
export(sim_pw_surv)
export(simfix2simpwsurv)
export(tenFHcorr)
export(wlr)
importFrom(Rcpp,sourceCpp)
importFrom(dplyr,arrange)
Expand Down
2 changes: 1 addition & 1 deletion R/MBdelayed.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
#'
#' # MaxCombo with logrank, FH(0,1), FH(1,1)
#' ten %>%
#' tenFHcorr(rho_gamma = tibble(rho = c(0, 0, 1), gamma = c(0, 1, 1))) %>%
#' wlr(rho_gamma = tibble(rho = c(0, 0, 1), gamma = c(0, 1, 1)), return_corr = TRUE) %>%
#' pvalue_maxcombo()
#'
#' # Magirr-Burman modestly down-weighted rank test with 6 month delay
Expand Down
6 changes: 3 additions & 3 deletions R/pvalue_maxcombo.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

#' MaxCombo p-value
#'
#' Computes p-values for the MaxCombo test based on output from [tenFHcorr()].
#' Computes p-values for the MaxCombo test based on output from [wlr()].
#' This is still in an experimental stage and is intended for use with
#' the [sim_fixed_n()] trial simulation routine.
#' However, it can also be used to analyze clinical trial data such as
#' that provided in the ADaM ADTTE format.
#'
#' @param z A dataset output from [tenFHcorr()]; see examples.
#' @param z A dataset output from [wlr()]; see examples.
#' @param dummy_var A dummy input that allows [dplyr::group_map()] to be used to
#' compute p-values for multiple simulations.
#' @param algorithm This is passed directly to the `algorithm` argument
Expand Down Expand Up @@ -81,7 +81,7 @@ pvalue_maxcombo <- function(
nrow(z)
),
corr = z %>%
select(starts_with("V")) %>%
select(starts_with("v")) %>%
data.matrix(),
algorithm = algorithm
)[1]
Expand Down
4 changes: 2 additions & 2 deletions R/sim_fixed_n.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#' in each block.
#' @param timing_type A numeric vector determining data cutoffs used;
#' see details. Default is to include all available cutoff methods.
#' @param rho_gamma As in [tenFHcorr()]. A `tibble` with variables
#' @param rho_gamma As in [wlr()]. A `tibble` with variables
#' `rho` and `gamma`, both greater than equal to zero,
#' to specify one Fleming-Harrington weighted logrank test per row.
#' @param seed Optional. Initial seed for simulations.
Expand Down Expand Up @@ -255,7 +255,7 @@ sim_fixed_n <- function(
} else {
z <- d %>%
counting_process(arm = "experimental") %>%
tenFHcorr(rho_gamma = rho_gamma, corr = TRUE)
wlr(rho_gamma = rho_gamma, return_corr = TRUE)
}

ans <- tibble(
Expand Down
138 changes: 0 additions & 138 deletions R/tenFHcorr.R

This file was deleted.

Loading

0 comments on commit b4aeaa7

Please sign in to comment.