Description Usage Arguments Details Value Examples
View source: R/case_crossover.R
Performs case-crossover analysis
1 2 3 | case_crossover(case_stay, data, exposure_diagnoses, exposure_procedures,
screening_index_stay, unique_exposure, interval_length, number_of_interval,
wash_out, los_max)
|
case_stay |
The data.table generated with age_study_period_restrictions() function. |
data |
A data.table of electronic medical records (EMRs): the same is used in first_case(). |
exposure_diagnoses |
A character vector containing codes to identify exposure diagnoses in stays. |
exposure_procedures |
A character vector containing codes to identify exposure procedures in stays. |
screening_index_stay |
A Boolean. If TRUE, the case stay is also screened for exposure. If FALSE, the case stay is ignored. |
unique_exposure |
A Boolean. If TRUE, patients with multiple stays with exposures are excluded. |
interval_length |
A scalar giving the duration of each interval. |
number_of_interval |
A scalar giving the number of intervals to compute. |
wash_out |
A scalar giving the wash-out period (defaut = 365 days). |
los_max |
A scalar giving the maximum possible length for an episode with exposure. |
The exposure is defined as a combination of diagnoses AND medical procedures which is sought on the one hand during the case period and on the other hand during the control period (one year earlier). The case period and hence the control period were split into several intervals. A paired-matched interval approach was used, as described by Mittleman. Conditional logistic regression was used to compare the likelihood of exposure during each interval of the case period with that during the control period. An OR and its 95 the risk of onset of the primary outcome compared to the basal risk. He/she also defined the maximum possible length for an episode with exposure. The case stay was excluded from the exposure screening period, if required. A patient presenting the exposure in multiple episodes was excluded, if required.
A list
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | data(ep)
obj0 <- ep
obj1 <- first_case(
data = obj0,
diagnoses_case = 'PE',
diagnoses_exclusion = 'EXCLUSION',
exclude_in_case_stay = FALSE,
n_of_stays_max = 20
)
obj1
obj2 <- age_study_period_restrictions(
data = obj0,
cases = obj1,
starting_year = 2007,
final_year = 2013,
age_min = 0,
age_max = 120
)
obj2
obj3 <- case_crossover(
case_stay = obj2,
data = obj0,
exposure_diagnoses = '',
exposure_procedures = 'THR',
screening_index_stay = FALSE,
unique_exposure = TRUE,
interval_length = 42,
number_of_interval = 8,
wash_out = 365,
los_max = 42
)
obj3
obj3$graph
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.