exposure: Work with exposure vs. conditions.

Description Usage Arguments Value

Description

Functions to retrieve risk ratio, difference in absolute risk and odds ratio.

Structure: Suppose you want to compare a group of people exposed to x vs. a group without exposure:

| | exposure | observed | comment | |—|————-|————-|——————-| | 1 | pos | yes | <- true positive | | 2 | pos | no | <- false positive | | 3 | neg | no | <- true negative | | 4 | pos | yes | ... | | 5 | neg | no | ... |

Usage

1
2
3
4
exposure_get_relation(data, exposure, condition, exposure_targ = TRUE,
  condition_targ = TRUE, alpha = eenv_alpha,
  haldane_anscombe_correction = TRUE, relations = c("OR", "RR", "ARR"),
  confusion_matrix = NULL)

Arguments

data

A tibble holding the data

exposure

The column holding the predicted conditions / exposure.

condition

The column holding the observed conditions.

exposure_targ

The value that signifies the exposed condition.

condition_targ

The value that signifies the targeted observed condition.

alpha

The alpha level.

haldane_anscombe_correction

Apply Haldane Anscombe correction if

relations

Vector with at least one in c("OR", "RR", "ARR"). necessary.

confusion_matrix

A confusion matrix as returned by test_get_confusion_matrix, data will be ignored.

Value

variable


randomchars42/eenv documentation built on May 20, 2019, 1:29 p.m.