getExposureStatus: Get the exposure status for cases (and controls).

Description Usage Arguments Details Value

View source: R/GetExposureStatus.R

Description

Get the exposure status for cases (and controls).

Usage

1
2
3
4
5
6
7
8
9
getExposureStatus(
  subjects,
  caseCrossoverData,
  exposureId,
  firstExposureOnly = FALSE,
  riskWindowStart = -30,
  riskWindowEnd = 0,
  controlWindowOffsets = c(-60)
)

Arguments

subjects

A data frame as generated using the selectSubjectsToInclude function.

caseCrossoverData

An object of type caseCrossoverData as generated using the getDbCaseCrossoverData function.

exposureId

The identifier of the exposure.

firstExposureOnly

Should only the first exposure per subject be included?

riskWindowStart

The start of the risk window (in days) relative to the index date. This number should be non-positive.

riskWindowEnd

The end of the risk window (in days) relative to the index date. This number should be non-positive.

controlWindowOffsets

Offsets in days of the control windows relative to the case window.

Details

This function determines the exposure status for a give, exposure ID in various windows relative to the index date.

Value

A data frame with these columns:

personId

The person ID

indexDate

The index date

isCase

Is the person a case or a control?

stratumId

The ID linking cases and controls in a matched set

isCaseWindow

Is this a case window (as opposed to a control window)?

exposed

Was the person exposed during the window?


OHDSI/CaseCrossover documentation built on Nov. 21, 2020, 7:03 a.m.