<- get_recurrence_covariates(df = out1,
step2 patientIdVarname = "idx",
eventCodeVarname = "icd10",
patientIdVector = patientIds)
6 Step 3: Recurrence
6.1 Genrate recurrence covariates
In this step, we generate 3 binary recurrence covariates for each of the candidate empirical covariates identified in the previous step:
- occurred at least once
- occurred sporadically (at least more than the median)
- occurred frequently (at least more than the 75th percentile)
6.2 Example of recurrence covariates
ICD-10-CM code (dimension 1) | code appeared at least once | code appeared at least more than the median | code appeared at least more than the 75th percentile |
---|---|---|---|
D64.9 Anemia | rec_dx_D64_once | rec_dx_D64_sporadic | rec_dx_D64_frequent |
D75.9P Blood clots | rec_dx_D75_once | rec_dx_D75_sporadic | rec_dx_D75_frequent |
D89.9 Immune disorder | rec_dx_D89_once | rec_dx_D89_sporadic | rec_dx_D89_frequent |
\(\ldots\) | \(\ldots\) | \(\ldots\) | \(\ldots\) |
E07.9 Disorder of thyroid | rec_dx_E07_once | rec_dx_E07_sporadic | rec_dx_E07_frequent |
Example of 3 binary covariates (hypothetical) created based on the candidate empirical covariates.
6.3 Recurrence covariates in the data
<- step2$recurrence_data
out2 ncol(out2)
#> [1] 92
Here we show binary recurrence covariates for only 2 columns
6.4 Refined recurrence covariates
Below you can click to see a list of all recurrence covariates obtained in our data.
Tip
- Given that we had one dimension of proxy data, \(p=1\), at most \(n=200\) most prevalent codes (with the restriction that minimum number of patients in each code = 20), and \(3\) intensity, we could theoretically have at most \(p \times n \times 3 = 1 \times 200 \times \ 3 = 600\) recurrence covariates.
- Based on all of the restrictions, we created 143 distinct recurrence covariates.
- The merged data (analytic and proxies) size is now 7,585.
- If 2 or all 3 recurrence covariates are identical, only one distinct recurrence covariate is returned. This is why you do not see any sporadic recurrence covariate here.
- Recurrence covariate creation is for each patient, and it is possible to have same code occur multiple time because we are working with a 3 digit granularity (possible to have medications from other codes within same ICD-10 3 digit granularity).