Module Examples

Date: March 2002

The following examples include a line-by-line explanation of the command syntax. The examples are based on data from Manitoba Health and from the Manitoba Bureau of Vital Statistics (Statistics Canada).

Abbreviations used in the examples are as follows:

VSTS: Vital Statistics
MHSIP: Manitoba Health Services Insurance Plan
SEX: Sex
DYR: Death year
DMO: Death month
DDA: Death day
BYR: Birth year
BMO: Birth month
LCA: Locality
MST: Marital status
INT: Initials


A. TESTPW Module
 

Syntax

SAS-PC format:

%_TESTPW(<options>);
%_VAR(<variables>);
%_RUN;


Unix:

_TESTPW <options>;
_VAR <variables>;
_RUN;
Notes:
  • The _VAR statement lists the variables to be used in the analysis.
  • Example of Program
    _TESTPW DATA=VSTS FREQ=NO;

    _VAR SEX DYR DMO DDA BYR BMO LCA MST;

    _RUN;

    _TESTPW DATA=MHSC FREQ=NO;

    _VAR SEX DYR DMO DDA BYR BMO LCA MST;

    _RUN;


    Output

    Note: the FREQ=NO option has been selected to suppress frequency tables).

    DATA=VSTS:
     
    Variable
    Missing
    Levels
    Discriminating Power
    Shannon Entropy
    BYR 0 98 55.5323 58.1759
    DDA 0 31 49.4068 49.5028
    BMO 970 12 35.8170 35.8330
    DMO 0 12 35.7624 35.8068
    DYR 0 4 19.9890 19.9945
    LCA 49 24 15.9797 28.1261
    MST 924 3 10.3678 11.5908
    SEX 0 2 9.8636 9.9314

    DATA=MHSC:
     
    Variable
    Missing
    Levels
    Discriminating Power
    Shannon Entropy
    BYR 0 91 56.0918 58.5864
    DDA 0 31 49.4451 49.4872
    BMO 394 12 35.8168 35.8330
    DMO 0 13 35.7973 35.8311
    DYR 0 4 19.9925 19.9962
    LCA 8 24 16.3289 28.5645
    MST 110 3 12.9641 14.0811
    SEX 0 2 9.5929 9.7925

    From these tables it can be noted that:
    1. The variable BYR (birth year) is the most powerful discriminator in each dataset and, therefore, the most useful for linkage purposes. Conversely, sex is the least powerful and the least useful for linkage.

    2. There is a substantial number of missing values for several of the VSTS variables. This could suggest data quality problems, such as coding errors. Before proceeding with the linkage, it would be advisable to review the data and correct as many of these errors as possible.

    B. TESTPK Module

    Syntax

    SAS-PC format:

    %_TESTPK(<options>);
    %_VAR(<variables>);
    %_RUN;
    Unix:
    _TESTPK <options>;
    _VAR <variables>;
    _RUN;


    Notes:

    For each pocket, the following information is provided:
    1. N: The number of pockets.
    2. MIN: The minimum number of records in a pocket.
    3. MAX: The maximum number of records in a pocket.
    4 MEAN: The mean number of records in a pocket.


    Example of Program
     

    _TESTPK DATA=VSTS;

    _VAR SEX DYR DMO DDA BYR BMO LCA MST;

    _RUN;


    Output

    DATA=VSTS:
     
    Pocket
    N
    Min
    Max
    Mean
    SEX
    2
    12 823
    15 592
    14 207.5
    SEX DYR 
    8
    3 091
    4 140
    3 551.9
    SEX DYR DMO 
    96
    214
    472
    296.0
    SEX DYR DMO DDA 
    2 936
    1
    173
    9.7
    SEX DYR DMO DDA BYR 
    25 242
    1
    13
    1.1
    SEX DYR DMO DDA BYR BMO 
    28 053
    1
    3
    1.0
    SEX DYR DMO DDA BYR BMO LCA 
    28 316
    1
    3
    1.0
    SEX DYR DMO DDA BYR BMO LCA MST
    28 407
    1
    2
    1.0


    C. The LINKEX Module

    Syntax
    SAS-PC format:
    %_LINKEX(<options>);
    %_BY(<variables>);
    %_VAR(<variables>);
    %_LPX('SAS statement');
    %_WTX('SAS statement');
    %_RUN;
    Unix:
    _LINKEX <options>;
    _BY <variables>;
    _VAR <variables>;
    _LPX 'SAS statement';
    _WTX 'SAS statement';
    _RUN;
    Notes:

    ©2003 Manitoba Centre for Health Policy (MCHP)