Skip to contents

N-1 Two Proportions Test

Usage

test_n_1_prop(data, x, y, conf_level = 0.95)

Arguments

data

data

x

x

y

y

conf_level

Confidence Level (default = 0.95)

Value

results

Examples

design = c("A","B")
complete = c(37, 22)
incomplete = c(418, 416)
data <- data.frame(design, complete, incomplete)
data <- data |> tidyr::pivot_longer(!design, names_to = "rate", values_to = "n") |>
  tidyr::uncount(n)
test_n_1_prop(data, design, rate, conf_level = 0.95)
#> # A tibble: 1 × 11
#>        a     b      c       d    den    num     z p_value     n lower_ci upper…¹
#>    <dbl> <dbl>  <dbl>   <dbl>  <dbl>  <dbl> <dbl>   <dbl> <int>    <dbl>   <dbl>
#> 1 0.0311 0.999 0.0617 0.00448 0.0166 0.0311  1.87  0.0617   893 -0.00186  0.0636
#> # … with abbreviated variable name ¹​upper_ci