calc_pattern_risk_ratio: Calculate risk ratio confidence interval

Description Usage Arguments Value Examples

View source: R/helpers_calc_pattern_risk_ratio.R

Description

Calculates a risk ratio confidence interval given a pattern and snp count. Uses the Fisher exact test from the the epitools package epitools::riskratio.small.

Usage

1
2
3
4
5
6
7
calc_pattern_risk_ratio(
  pattern_n,
  pattern_snp,
  other_n,
  other_snp,
  CI_size = 0.95
)

Arguments

pattern_n

Number of cases with pattern

pattern_snp

Number of cases with pattern and SNP minor allele

other_n

Number of cases without pattern

other_snp

Number of cases without pattern and with SNP minor allele

CI_size

Size of CI in proportion (default 0.95 = 95 percent interval)

Value

List with three entries: PE or RR point estimate, lower and upper for RR lower and upper bounds given interval size.

Examples

1
calc_pattern_risk_ratio(pattern_n=120, pattern_snp=5, other_n=2000, other_snp=56, CI_size = 0.95 )

tbilab/meToolkit documentation built on June 23, 2020, 9:55 a.m.