Create table 1 (adjusted baseline) using the output from covariate adjustments module.
More...
Create table 1 (adjusted baseline) using the output from covariate adjustments module.
- Check if required input file exists and abort if not
- Determine if there are <2 groups (exposure/reference) for any monitoring period
- Initialize macro variables and determine lists of variables to process
- Create lab covariates additional variables if necessary
- Create empty adjusted baseline table
- Create boolean indicators for variables to process
- Extract subgroup/subgroupcat sample and create boolean indicators for categorical variables to process
- Create required tables based on ANALYSISTYPE
- Unadjusted/Unweighted table (always)
- Adjusted/Unweighted (PSMATCH fixed ratio match, PSSTRATWEIGHT, PSIPTW)
- Adjusted/Weighted (PSMATCH variable ratio match, PSSTRAT, PSSTRATWEIGHT, PSIPTW)
- For each of the 3 tables above:
- Restrict sample to Adjusted/Unadjusted cohort
- Add lab covariates data if required
- Compute number of patients and episodes and output to table
- Compute COVAR*_NOTESTRECORD
- Apply weight
- Create sums by exposure
- Process both DICHOTOMOUS and CONTINUOUS variables. For each one:
- Compute sums and S2sqLeftPart for each variable
- Compute S2sqRightPart for each variable
- Prepare exposure and reference groups data
- Merge exposure with reference data and compute final metrics
- Add to adjusted baseline table
- Stack dichotomous and continuous data
- Restore original variable names for lab units and results
- When subgroups are requested, create a square table to be used when there are no patients in a subgroup cohort to make sure this subgroup is output in the table
- Program inputs
- INPUT dataset: Input dataset that contains patient level data required to compute and output the table 1 (adjusted baseline) for a specific analysisgrp/subgroup/subgroupcat
- infolder.&COHORTCODES. (Dataset with codes used to define exposures and outcomes of interest)
- infolder.&COHORTFILE. (Dataset used to define enrollment and demographic requirements, type of cohort identification strategy)
- infolder.&MICOHORTFILE. (Dataset for Type 4 analysis used to describe pregnancy cohorts among pregnancies matched to an infant)
- infolder.&RISKSCOREFILE. (Dataset required for calculating one or more risk scores)
- worktemp.labcovar_notestrec (Dataset with no test record data for lab covariates)
- Program outputs
- OUTDATA dataset: Table 1 (adjusted baseline) with data for a specific analysisgrp/subgroup/subgroupcat
- worktemp._adjusted_baseline_square: Square table to be used when there are no patients in a subgroup cohort to make sure this subgroup is output in the table
Usage
%ms_adjustedbaselinetables(input = dplocal.R01_adjusted_1_1,
psvar = pscore,
eoigrp=&eoigrp.,
refgrp=&refgrp.,
subgroup = "",
subgroupcat = "",
adjustmentvar = iptw,
analysistype = PSIPTW,
type=2,
variablestoexclude=,
riskscorefile=&riskscorefile.,
geog=Y,
startyear=&startyear.,
outdata=msoc.&runid._adjusted_baseline_1);
- Parameters
- Parameters
-
| [in] | INPUT | Input file with patient level data required to compute and output the table 1.
|
| [in] | PSVAR | Name of variable in INPUT used to identify the propensity score.
|
| [in] | EOIGRP | Name of the exposure group.
|
| [in] | REFGRP | Name of the reference group.
|
| [in] | SUBGROUP | Subgroup being processed.
|
| [in] | SUBGROUPCAT | Subgroup category being processed.
|
| [in] | ADJUSTMENTVAR | Name of variable in INPUT used for adjustment (matchid, percentile, covarstrat, iptw). |
| [in] | ANALYSISTYPE | Adjustment being performed (PSMATCH PSSTRATWEIGHT, PSSTRAT, COVSTRAT, PSIPTW). |
| [in] | TYPE | Type of analysis being performed (2=Exposures and Follow-up Time, 4=Pregnancy Episodes). |
| [in] | VARIABLESTOEXCLUDE | List of variables in INPUT to exclude from the analysis. |
| [in] | RISKSCOREFILE | Name of the riskscore file input file if any. |
| [in] | GEOG | Indicator (Y/N) for the availability of CB_REG# and SDICAT# variables. |
| [in] | STARTYEAR | Starting year of the exposure period. |
| [OUT] | OUTDATA Name of the adjusted baseline table to be produced. |
SAS Macros Dependencies
- Author
- Sentinel Coordinating Center (info@.nosp@m.sent.nosp@m.inels.nosp@m.yste.nosp@m.m.org)