This macro creates a baseline table, and an optional covariate profile table.
- Create baseline profile.
- Create baseline table.
- Strip age group of special characters.
- Square age for reporting.
- Create age group dummies.
- Create sex dummies.
- Create race dummies.
- Create hispanic dummies.
- Create year dummies.
- For type 4:
- Create PrePostInd dummies.
- Create preg_outcome dummies.
- Get list of requested outcomes for squaring.
- Create riskscore categories dummies.
- Convert scores categories to cat1, cat2, ... catN.
- Create lab covariates additional variables.
- Because we do not know which covariates have additional lab variables, we need to get this information from the list of variables available in _RawData.
- Sorting by name to make sure covar::lab_result variable is always before covar::lab_unit for the algorithm.
- Loop through lab additional variables and get distinct values for each one.
- Restrict to character variables. Numeric variables are linked to a character variable (i.e. covar::lab_unit1 is linked to covar::lab_result1).
- If variable is character, loop through distinct values.
- Remove forbidden characters from new variable names.
- If the variable is linked to a numeric variable, add it to the list to compute mean and std.
- Merge back dummies.
- Create a new patient indicator to count distinct patients.
- Process discrete and continuous variables and merge the two.
- Square with missing variables for sex, race, hispanic, year and PrePostInd (for type 4).
- Square riskscores categories (if applicable).
- Add missing groups (if any).
- Create switchstep indicator for when stacking datasets and remove dummy covariates (if any).
- Program inputs
- dplocal.&RUNID._ads_&DATA._&I.(Dataset containing one record per GROUP, PATID, and INDEXDT.)
- infolder.&COHORTFILE. (Dataset used to define enrollment and demographic requirements, type of cohort identification strategy.)
- Program outputs
- msoc.&RUNID._baseline&OUTCOHORT._&I. (Dataset including metrics for cohorts of interest during baseline.)
- msoc.&RUNID._profile_&I. (Dataset containing patients and episodes by their unique combination of covariates observed.)
Usage
%ms_createdistbaselinetable(WHERE=(&groupvar. in("&&prev&groupvar.s.") and previnc_def in("Both","Prev")),
T3OUT=);
- Parameters
-
[in] | WHERE | Where clause to restrict DPLocal.&RUNID._ads_&data._&i. for computations.
|
[out] | T3OUT | For Type 3 analyses, it takes the value of _an and _an_censor for analysis and analysis_censor datasets. It is blank for all non-Type 3 analyses.
|
SAS Macros Dependencies
None.
- Author
- Sentinel Coordinating Center (info@.nosp@m.sent.nosp@m.inels.nosp@m.yste.nosp@m.m.org)