From 9d598108f76a4fcadbf87867b232faefc99ecd4b Mon Sep 17 00:00:00 2001 From: kuenzelt <122105979+kuenzelt@users.noreply.github.com> Date: Wed, 7 Feb 2024 11:42:22 +0100 Subject: [PATCH] Update R/inc_prop.R Co-authored-by: Daniel Sabanes Bove --- R/inc_prop.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/inc_prop.R b/R/inc_prop.R index 6c0c200..7f451e2 100644 --- a/R/inc_prop.R +++ b/R/inc_prop.R @@ -37,7 +37,7 @@ inc_prop <- function(data, assert_true(tau > 0) n <- nrow(data) - ae <- nrow(data[data$type_of_event == 1 & data$time_to_event <= tau, ]) / n + ae <- sum(data$type_of_event == 1 & data$time_to_event <= tau) / n ae_prob_var <- ae * (1 - ae) / n c("ae_prob" = ae, "ae_prob_var" = ae_prob_var)