Skip to content

Commit

Permalink
fix cmd check
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleBeannie committed Apr 10, 2024
1 parent 308006f commit ce8d985
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
5 changes: 2 additions & 3 deletions R/to_sim_pw_surv.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,9 @@
#' )
#'
#' # Cut after 200 events and do a stratified logrank test
#' dat <- sim |>
#' sim |>
#' cut_data_by_event(200) |> # Cut data
#' counting_process(arm = "experimental") |> # Convert format for fh_weight()
#' fh_weight(rho_gamma = data.frame(rho = 0, gamma = 0)) # Stratified logrank
#' wlr(weight = fh(rho = 0, gamma = 0)) # Stratified logrank
to_sim_pw_surv <- function(
# Failure rates as in sim_fixed_n()
fail_rate = data.frame(
Expand Down
2 changes: 1 addition & 1 deletion R/wlr.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ wlr <- function(data, weight, return_variance = FALSE) {
if (inherits(weight, "fh")) {
x <- x |> fh_weight(rho = weight$rho, gamma = weight$gamma)

ans$parameter <- paste0("FH(rho=", weight$rho, ", gamma =", weight$gamma, ")")
ans$parameter <- paste0("FH(rho=", weight$rho, ", gamma=", weight$gamma, ")")
ans$estimation <- sum(x$weight * x$o_minus_e)
ans$se <- sqrt(sum(x$weight^2 * x$var_o_minus_e))
ans$z <- ans$estimation / ans$se
Expand Down
5 changes: 2 additions & 3 deletions man/to_sim_pw_surv.Rd

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

0 comments on commit ce8d985

Please sign in to comment.