Skip to content

Commit

Permalink
Update R/inc_prop.R
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Sabanes Bove <[email protected]>
  • Loading branch information
kuenzelt and danielinteractive authored Feb 7, 2024
1 parent 07252a7 commit 9d59810
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/inc_prop.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9d59810

Please sign in to comment.