
Last chance! 50% off unlimited learning
Sale ends in
Create odds ratio and confidence interval from matched pairs data.
# S3 method for table
matched_or(df, alpha = 0.05, rev = c("neither", "rows",
"columns", "both"), ...)
a dataframe with binary variables x and y or a 2 x 2 frequency table/matrix.
level of significance for confidence interval.
reverse order of cells. Options are "row", "columns", "both", and "neither" (default).
further arguments passed to or from other methods.
a list with class "matched_or" with the following components:
2x2 table using for calculating risk difference
dataframe with columns corresponding to matched-pairs OR, lower bound, and upper bound of CI
specified confidence level
# NOT RUN {
gene <- data.frame(pair = seq(1:35),
ulcer = rbinom(35, 1, .7),
healthy = rbinom(35, 1, .4))
gene_tab <- xtabs(~ ulcer + healthy, data = gene)
gene_tab %>% matched_or()
# }
Run the code above in your browser using DataLab