chi_and_bin: chi_and_bin

Description Usage Arguments Value Examples

View source: R/chi_and_bin.R

Description

Example data from "https://www.rivm.nl/en/novel-coronavirus-covid-19/children-and-covid-19"

Usage

1

Arguments

x

A matrix-like object with two columns: success and fail

Value

Print outs results of chisq.test and binom.test. Returns result of binom.test as a tibble with fields: "estimate", "statistic", "p.value", "parameter", "conf.low", "conf.high", "method", "alternative"

Examples

1
2
3
4
5
6
7
8
data <- structure(list(Age = structure(c(2L, 7L, 3L, 4L, 5L, 6L, 8L, 9L, 10L, 1L),
.Label = c(">=80", "0-4", "13-18", "19-29", "30-39", "40-49", "5-12", "50-59",
"60-69", "70-79"), class = "factor"),
Infected.contacts = c(0L, 0L, 0L, 5L, 2L, 12L, 22L, 3L, 7L, 4L),
 Non.infected.contacts = c(2L, 29L, 12L, 64L, 44L, 152L, 209L, 47L, 67L, 28L)),
  class = "data.frame", row.names = c(NA, -10L))

chi_and_bin(data[,2:3])

HywelMJ/hywel documentation built on April 30, 2020, 12:05 a.m.