validate_prevalence_table: Check if the prevalence table parameters are sufficient and...

View source: R/validate_prevalence_table.R

validate_prevalence_tableR Documentation

Check if the prevalence table parameters are sufficient and valid to calculate an odds ratio

Description

The validate_prevalence_table() function determines if the set of provided parameters match a set of parameters (a 'grain') that is sufficient to calculate an odds ratio and its confidence intervals. Additionally, it checks if those parameters are valid.

Usage

validate_prevalence_table(
  .P = NA,
  .Q = NA,
  .R = NA,
  .S = NA,
  .nexp = NA,
  .nref = NA
)

Arguments

.P, .Q, .R, .S

Numeric: prevalence of outcomes.

.nexp

Numeric: the total number exposed to the factor.

.nref

Numeric: the total number not exposed to the factor.

Details

A prevalence table is shown here.

Outcome+ Outcome- Total
Exposed P% Q% M1
Referent R% S% M2

See check_grain for more details.

Value

A list of three values: is_valid (logical), status (string), and table_type (string).


iAM-AMR/sawmill documentation built on June 30, 2024, 2:25 a.m.