Percent Distribution for RTRA

percent-distribution-rtra.pdf (PDF, 302.19 KB)

Basic Percent Distribution for RTRA

1. Percentage Distribution is a frequency distribution in which the individual class frequencies are expressed as a percentage of the total frequency equated to 100. Also known as relative frequency distribution; relative frequency table.

The %RTRAPercentDist macro can be used for producing percentage distribution tabulations.

To generate a Percent Distribution, call the following RTRA procedure:

%RTRAPercentDist(
InputDataset=,
OutputName=,
ClassVarList=,
UserWeight=);

2. %RTRAPercentDist parameter definition:

InputDataset = identify the input data set from the WORK area to be used by the procedure.

OutputName = identify the name of the output files you want returned (maximum of 20 characters and the first character must be a letter).

ClassVarList = identify a maximum of five variables for the dimensions of the Percent procedure. These variables need to be delimited by spaces or asterisks. Each variable must contain more than one but no more than 500 unique values.

UserWeight = refer to the RTRA parameters document to identify a survey weight. The weight variable identified will be merged onto the input data set using the ID variable.

3. Applying %RTRAPercentDist varies depending if the data has bootstrap weights.

When data has bootstrap weights applied, the output will contain quality indicators specific to the selected variables. For more information about quality indicators, please visit the RTRA Outputs page.

An example of %RTRAPercentDist using data with bootstrap weights:

Suppose you ran the following RTRA procedure to generate a percent distribution table named "Table1" with the variable called "Gender" using the Aboriginal Peoples Survey (APS) 2012.

Your RTRA procedure call will look like this:

%RTRAPercentDist(
InputDataset=work.APS,
OutputName=Table1,
ClassVarList= Gender,
UserWeight=WGHT);

Table 1
Results from example procedure
GENDER _PERCENTDIST_ PERCENTDIST_SE PERCENTDIST_CILB PERCENTDIST_CIUB PERCENTDIST_BSWCNT _COUNT_
  1 0 0.999865 1 1000 963100
Female 0.53 0.00523 0.52 0.54 1000 513640
Male 0.47 0.00523 0.46 0.48 1000 449460

L5 Percent Distribution for RTRA

1. This is the RTRA procedure macro for producing Percent Distribution tabulations which include a selected Level 5 statistic. RTRAPercentDistL5 is a wrapper macro. It calls the macro ProcessRequest which is the processing routine common to all RTRA procedure macros and can be used for producing percentage distribution tabulations.

To generate an L5 Percent Distribution, call the following RTRA procedure:

%RTRAPercentDistL5(
InputDataset=,
OutputName=,
ClassVarList=,
L5Stat=,
L5Type=,
L5ByVar=,
L5BaseVal=,
UserWeight=);

2. %RTRAPercentDistL5 parameter definition:

InputDataset = identify the input data set from the WORK area to be used by the procedure.

OutputName = identify the name of the output files corresponding to this call to %RTRAPercentDistL5. Tabulated results are assigned an internally generated name rather than the name in this parameter. The post-processing parameters data set defines the correspondence between the internally generated name and the final output file names. Post-processing is then responsible for creating the final output files name.

ClassVarList = identify a maximum of five variables to be included on the percent distribution table. Variables in the list can be separated by any number of spaces, asterisks or combination of spaces and asterisks.

L5Stat= identifies the name of the Level 5 statistic. Valid values are LC and ST (case insensitive)

L5Type = identifies the Level 5 statistic type. Valid values are SEQUENTIAL, BASE and GLOBAL (case insensitive).

L5ByVar = identifies the Level 5 BY variable. The specified variable must exist in <classVarList>.

L5BaseVal = identifies the Level 5 base value. This parameter is only applicable if <L5Type> is BASE and must be blank if <L5Type> is SEQUENTIAL or GLOBAL. If applicable, the specified value must exist in the variable <L5ByVar> in the input data set.

3. Example: Suppose you ran the following RTRA procedure to generate a percent distribution table named "Table2" with the variables called "Education" and "Province" using the Labour Force Survey.

Your RTRA procedure call will look like this:

%RTRAPercentDistL5(
InputDataset=work.LFS,
OutputName=Table2,
ClassVarList= Education Province,
L5Stat=LC,
L5Type=sequential,
L5ByVar=education,
L5BaseVal=,
UserWeight=FINALWT);

The following table displays results from the Level 5 Percent Distribution example procedure above. Please note that this is a section of the data in the documentation and a select few entries of the actual output have been pulled for the purpose of having smaller outputs.

Table 2
Results from example procedure
EDUCATION PROVINCE PERCENTDIST PERCENTDIST_LCS COUNT
College Manitoba 0.0079 0 3321500
High School Manitoba 0.0088 0.00091 3702250
University Manitoba 0.003 -0.0057 2531750
College Ontario 0.096 0 40167000
High School Ontario 0.093 -0.0031 38880000
University Ontario 0.086 -0.028 36012500

L5SOT Percent Distribution for RTRA

1. This is the RTRA procedure macro for producing Percent Distribution tabulations which include a selected Level 5 Sequential Over Time (L5SOT) statistic. RTRAPercentDistL5SOT is a wrapper macro. It calls the macro ProcessRequest which is the processing routine common to all RTRA procedure macros.

The %RTRAPercentDistL5SOT macro can be used for producing percentage distribution tabulations.

To generate an L5 Percent Distribution, call the following RTRA procedure:

%RTRAPercentDistL5SOT(
InputDataset=,
OutputName=,
ClassVarList=,
L5Stat=,
L5YrVar=,
L5MonVar=,
L5QtrVar=,
L5TimeInt=,
UserWeight=);

2. %RTRAPercentDistL5SOT parameter definition:

InputDataset = identify the input data set from the WORK area to be used by the procedure.

OutputName = identify the name of the output files corresponding to this call to RTRAPercentDistL5SOT. Tabulated results are assigned an internally generated name rather than the name in this parameter. The post-processing parameters data set defines the correspondence between the internally generated name and the final output file names. Post-processing is then responsible for creating the final output files name.

ClassVarList = identify a maximum of five variables to be included on the percent distribution table. Variables in the list can be separated by any number of spaces, asterisks or combination of spaces and asterisks.

L5Stat= identifies the name of the Level 5 statistic. Valid values are LC and ST (case insensitive).

L5YrVar= identifies the Level 5 year variable.

L5MonVar = (optional) identifies the Level 5 month variable. Valid to omit this parameter or specify blank. If L5MonVar is specified then L5 QtrVar must be blank or omitted.

L5QtrVar = (optional) identifies the Level 5 quarter variable. Valid to omit this parameter or specify blank. If L5 QtrVar is specified then L5MonVar must be blank or omitted.

L5TimeInt= (optional) identifies the Level 5 time interval. Value specified must be an integer greater than 0. Valid to omit this parameter but default integer must be 1.

UserWeight = refer to the RTRA parameters document to identify a survey weight. The weight variable identified will be merged onto the input data set using the ID variable.

3. Applying %RTRAPercentDistL5SOT varies depending on if the data has bootstrap weights.When data has bootstrap weights applied, the output will contain quality indicators specific to the selected variables. For more information about quality indicators, please visit the RTRA Outputs page.

An example of %RTRAPercentDistL5SOT using data with bootstrap weights:

Suppose you ran the following RTRA procedure to generate a percent distribution table named "Table3" with the variable called "Education" using the Labour Force Survey.

Your RTRA procedure call will look like this:

%RTRAPercentDistL5SOT(
InputDataset=work.LFS,
OutputName=Table3,
ClassVarList= Education,
L5Stat=LC,
L5YrVar=NUM_SYEAR,
L5MonVar=NUM_SMTH,
L5TimeInt=4,
UserWeight=FINALWT);

The following table displays results from the example procedure above. In particular we are able to determine the "Sequential Over Time" Percent Distribution between months based on various Education levels. Please note that this is a section of the data in the documentation and a select few entries of the actual output have been pulled for the purpose of having smaller outputs. For this example we will only pull results for University responses.

Table 3
Results from example procedure
NUM_SYEAR NUM_SMTH EDUCATION PERCENTDIST PERCENTDIST_LCS COUNT
2015 April University 0.194   6773500
  May University 0.195 0.00173 6799250
  June University 0.198 0.0045 6908500
  July University 0.2 0.0076 7024250
  August University 0.2 0.009 7113250
Date modified: