Compares observed failures per group with the number expected under
a common hazard, standardised by the hypergeometric variance.
Equivalent to survival::survdiff with rho = 0.
Examples
morie_logrank_test(time = c(1, 2, 3, 4, 5, 6, 7, 8), event = c(0, 1, 0, 1, 1, 0, 1, 0),
group = rep(c("a", "b"), 4))
#> $statistic
#> [1] 0.02983838
#>
#> $df
#> [1] 1
#>
#> $p_value
#> [1] 0.8628575
#>
#> $observed
#> a b
#> 2 2
#>
#> $expected
#> a b
#> 1.828571 2.171429
#>
#> $groups
#> [1] "a" "b"
#>
