This macro creates censor and followup time tables.
- Re-scope global variable &CENSDAYS_VALUE_CAT. to local.
- Add censorcat_sort as a class var.
- Assign censdays_value_cat.
- Create squared table.
- Count the number of flag variables.
- Loop through each group. It will only loop if the age stratification is the same across all groups.
- If all groups are running, then grouplist is blank. Otherwise only aggregate data for current group.
- Square categorical values, censdays_value_cat, and event_flag.
- Loop through each dplocal flag and assign msoc flag.
- Store patient nums to msoc.
- Summarize data.
- Program inputs
- dplocal.&RUNID._mstr (Dataset for Type 1 and Type 2 analyses with one record per individual per index date for every GROUP.)
- Program outputs
- msoc.&RUNID._censor_cida (Dataset containing information on time to censoring for Type 2 analyses.)
- msoc.&RUNID._followuptime_cida (Dataset containing information on the number of episodes, event status, and reason for censoring for every day of follow-up for Type 2 analyses.)
Usage
%ms_createcensortable(TABLE=censor,
CONVAR=timetocensor,
CATVAR=censdays_value_cat,
DPLOCALFLAGLIST=cens_elig cens_dth cens_dpend cens_qryend,
MSOCFLAGLIST=cens_elig cens_dth cens_dpend cens_qryend);
- Parameters
-
| [in] | TABLE | Censor or followuptime. |
| [in] | CONVAR | continuous Followup time variable (timetocensor or followuptime). |
| [in] | CATVAR | categorical Followup time variable to save to DPLOCAL mstr file (censdays_value_cat or fupdays_value_cat). |
| [in] | DPLOCALFLAGLIST | List of flag variables in mstr to aggregate up. |
| [in] | MSOCFLAGLIST | List of flag variables to include in msoc aggregated table. |
SAS Macros Dependencies
- Note
- Continuous variable censdays_value and categorical variable censdays_value_cat are included in the aggregated MSOC table regardless of which metric is being output.
- Author
- Sentinel Coordinating Center (info@.nosp@m.sent.nosp@m.inels.nosp@m.yste.nosp@m.m.org)