View source: R/CreateCaseControlData.R
createCaseControlData | R Documentation |
Create case-control data
createCaseControlData( caseControlsExposure, exposureId, firstExposureOnly = FALSE, riskWindowStart = 0, riskWindowEnd = 0, exposureWashoutPeriod = 0 )
caseControlsExposure |
An object of type |
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. |
exposureWashoutPeriod |
Minimum required numbers of days of observation for inclusion of an exposure. |
For each case and control, assesses whether exposure takes place within the risk window. The output can be directly used in a conditional logistic regression.
A data frame with these columns:
The person ID
The index date
Is the person a case or a control?
The ID linking cases and controls in a matched set
Was the subject exposed during the risk window?
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.