QRP
 
Loading...
Searching...
No Matches
ms_adjustedbaselinetables.sas File Reference

Create table 1 (adjusted baseline) using the output from covariate adjustments module. More...

Detailed Description

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]INPUTInput file with patient level data required to compute and output the table 1.
[in]PSVARName of variable in INPUT used to identify the propensity score.
[in]EOIGRPName of the exposure group.
[in]REFGRPName of the reference group.
[in]SUBGROUPSubgroup being processed.
[in]SUBGROUPCATSubgroup category being processed.
[in]ADJUSTMENTVARName of variable in INPUT used for adjustment (matchid, percentile, covarstrat, iptw).
[in]ANALYSISTYPEAdjustment being performed (PSMATCH PSSTRATWEIGHT, PSSTRAT, COVSTRAT, PSIPTW).
[in]TYPEType of analysis being performed (2=Exposures and Follow-up Time, 4=Pregnancy Episodes).
[in]VARIABLESTOEXCLUDEList of variables in INPUT to exclude from the analysis.
[in]RISKSCOREFILEName of the riskscore file input file if any.
[in]GEOGIndicator (Y/N) for the availability of CB_REG# and SDICAT# variables.
[in]STARTYEARStarting 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)