UserGuide BioStat Prime Help

Risk Set Matching

Performs risk set subject matching within a cohort. Those with the outcome event (cases) are matched to those who have not had the event (controls) and are in the risk set at the event time of the case. This is a nested case/control design. Baseline variables known at cohort entry are also used to match cases and controls.

Baseline variables for which values have to match exactly and values matching within numerical calipers are supported. Controls are randomly selected from among all eligible controls for each case.

The output dataset containing the matched data will contain the original variables, the event indicator ("failed"), and a variable identifying the matched set ("match.num").

Observations with any missing values for variables involved in the matching process are removed prior to matching.

To perform Risk Set Matching user needs to follow the steps given bellow.

Steps

Load the dataset -> click on the DATASET tab in main menu -> select MATCHING -> select Subject Risk Set Matching -> Once, the dialog appears select the functions to be applied to the variables being executed -> Execute the dialog.

risk set matching

Arguments

Dataset name to store matched data:

Name of output dataset containing the matched subject sets.

Event variable (1=event, 0=censor):

Name of variable indicating those with events. Must be numeric with 1=event and 0=censor.

Variables for matching:

Specify the baseline variables for which you want the case/control sets to be matched. These must be numeric.

Specify calipers in order of matching variables separated by commas:

Specify the numeric caliper values for each of the variables, in order of the variables. Exact matches should use a caliper of 0. For example, if age (in years) was specified with a caliper of 5, that means the controls must be within +/- 5 years of their matched case. Each matching variable must have a caliper value specified.

Number of controls per case:

This is the maximum number of controls that will be matched to each case. Some matched sets may have less than this value if suitable matches cannot be identified.

Allow controls to be matched more than once:

Specify whether or not you want controls to potentially be matched to more than one case. We recommend this option to be selected to avoid bias.

Don't allow cases to be matched to other cases:

Specify whether to allow cases to be considered as controls before the case event time. We recommend not selecting this option to avoid bias. Not selecting this option means a case is in the control risk set pool, and eligible to be matched to another case, up until their event time.

Last modified: 01 October 2025