This macro computes denominators.
More...
This macro computes denominators.
- Only compute denominators if OUTPUTDENOM ne N and USERSTRATA file is specified and contains relevant tables.
- Original enrollment periods.
- If death censoring is required, it was already applied (Enr_End was previously truncated by CIDAnum).
- Restrict eligibility to study period (minus maximum of required lookbacks).
- Initially truncate start eligibility enrollment start by max of lookback periods.
- Inclusion required (POV3 Incl) for eligibility.
- For each condition, shave periods for all subconditions.
- Determine how many levels of subconditions needed and if condition is an inclusion.
- Create &cond specific dataset.
- Determine if subcond is an inclusion or exclusion.
- Merge time periods for each subcondition and shave for each.
- When cumdose or afdd specified create a de-duped inclexcl dataset.
- Necessary for codedays computation.
- Only keep time periods that meet codedays criteria.
- If mincumdose or average filled cumulative dose is specified then restrict eligibility periods.
- Drop refstart and refend since _Denom&Group can be looped.
- When cumdose or afdd specified create a de-duped inclexcl dataset.
- Necessary for codedays computation.
- Only keep time periods that meet codedays criteria.
- Output dataset for inclusion=1 and for exclusions=0 and then (a) shaveoutside (b) shaveinside denom.
- For inclusions, need to merge periods.
- First shaveoutside denom file but need to merge inclusion periods together.
- _Denom&Group._STACK_INC includes all time periods where the potential index dates will meet at least one of the cond inclusions.
- Merge all periods of ineligibilities.
- _Denom&Group._STACK_EXCL includes all time periods where the potential index dates will meet at least one of the cond exclusions.
- Remove all these periods from the ELIG.
- Create separate prevalance and incidence cidadenom datasets.
- Group Index (POV1) to remove from eligibility.
- Need to use washper2 when autoprev = Y.
- Follow-up Event (POV5) to remove from eligibility.
- Only apply to type 2 analysis.
- Follow-up Washout (POV6) to remove from eligibility.
- This macro is to avoid having to output one record per interval per stratification level which for certain partners, can become quite large.
- Make sure the number of enrollment days remaining after each potential elig days is sufficient.
- Get first Index Dates and Event Dates to handle member days correctly according to CohortDef.
- Adjust eligibility end date.
- Secondary episode observation window.
- Remove invalid time due to obsfrom-obsto enrollment/data availability criteria.
- Because DenomEnrEndDt can have been truncated, keep only the observations with positive member days.
- Add dob/sex/race/hispanic.
- Demographics:
- Process zip codes.
- Truncate periods such that all interval lies in MinAge-MaxAge.
- Member not meetin minimum age yet.
- Member has reached or will reach will reach MaxAge.
- At this point, each day in the DenomEnrStartDt-DenomEnrEndDt intervals represents a potential index date if the patients would have started one of the study drugs.
- Restrict only to the ExpPeriodStartDt-ExpPeriodEndDt period.
- This will simplify accumulating days for year and year/Month strata, especially if the ExpPeriodStartDt day is not the first day of the month and or the first month of the year.
- Save denominators for future processing.
- Create individual denom contribution to final table.
- If no observations in _denom&group, square the table.
- Sum denominators for each stratification.
- Check if level is required in userstrata file.
- Check if level needs the CreateSums macro output.
- Quarter periods.
- Geographic should not produce month/quarter output.
- Break down periods by age categories.
- Geographic categories.
- Produce uncertain level stratifications, regardless of geographic region specified.
- Adjust denominator for zip_date.
- 1. If zip_date < DenomEnrStartDt, full enrollment is certain.
- 2. If zip_date is missing, full enrollment is uncertain.
- 3. If zip_date > ZipEnrEnd, then no uncertain time.
- 4. If DenomEnrStartDt <= zip_date <= DenomEnrEndDt, then calculate uncertain time.
- Verify if at least one stratum was computed.
- Store patient denoms to dplocal.
- For type 2:
- Create Prevalent and Incident dataset.
- Program inputs
- infolder.&ZIPFILE. (Lookup table required if a request requires stratification of results by geographic location.)
- work._fupevent (Follow-up Event (POV5) to remove from eligibility.)
- work._fupwash (Follow-up Washout (POV6) to remove from eligibility.)
- work._groupindex (Dataset containing all potential outcomes.)
- work._inclexcl (Dataset with a list of control patients and demo data.)
- work._inclexcl_cumdose (Dataset with eligible periods meeting the cumulative dose or average filled daily dose criteria.)
- work._it&INCLUSIONCODES. (Dataset with inclusion/exclusion definition.)
- work.userstrata_denom (Dataset containing unique levelvars per table type (prevalent or not).)
- worktemp.enr_&ENROLLMENTNUM. (Dataset containing enrollment episodes.)
- Program outputs
- dplocal.&RUNID._denomcounts&DS_SUFFIX. (Dataset for eligible members and member-days metrics for the T1_CIDA and T2_CIDA tables in the msoc output folder.)
- work._eligincl_&SUBCOND. (Dataset containing eligible time periods for each subcondition.)
- work._overlap_spans_&SUBCOND. (Dataset containig only the time periods that meet codedays criteria.)
- worktemp._nvrexp&GROUP. (Dataset containing never exposed cohort.)
Usage
%ms_cidadenom();
- Parameters
- None.
SAS Macros Dependencies
- Author
- Sentinel Coordinating Center (info@.nosp@m.sent.nosp@m.inels.nosp@m.yste.nosp@m.m.org)