Download the DOC version (DOC, 40.5 KB)

1. The RTRA ratio procedure shows the relationship between two **continuous** variables. For example, this procedure can be used to calculate the ratio of income to spending by sex. To generate a ratio, call the following RTRA procedure:

**%RTRARatio (**

InputDataset=,

OutputName=,

ClassVarList=,

NumeratorVar=,

DenominatorVar=,

ByVar=,

UserWeight=);

2. **%RTRARatio** parameter definition:

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

**OutputName** = identify the output dataset name you want returned (maximum of 20 characters and the first character must not be an underscore).

**ClassVarList** = identify a maximum of four variables for the dimensions of the ratio procedure. These variable needs to be delimited by a space or asterisk. Each variable must contain more than one but no more than 500 unique values. This parameter may be left empty if you wish to calculate ratios for the entire population.

**NumeratorVar** = identify exactly one variable as the numerator. This variable must be of type numeric.

**DenominatorVar** = identify exactly one variable as the denominator. This variable must be of type numeric.

**ByVar** = identify exactly one variable for the ratio procedure. This 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. Example: This procedure can be used to calculate the ratio of total income over total number of hours worked, giving an hourly wage rate. You would like this ratio calculated for each “Province”.

**%RTRARatio (**

InputDataset=work.LFS,

OutputName=Table1,

ClassVarList=,

NumeratorVar=Income,

DenominatorVar=Hours_worked,

ByVar=Province,

UserWeight=Finalwt);

The following table displays results from the example procedure above.

Province | _Ratio_ | _Count_ |
---|---|---|

27268000 | ||

ON | 9.50 | 428000 |

QC | 9.00 | 115000 |

BC | 8.00 | 784000 |

SK | 9.25 | 628000 |

MB | 9.00 | 6420000 |

AB | 8.80 | 10580000 |

NS | 8.60 | 955000 |

NL | 9.00 | 806000 |

PEI | 8.40 | 2839000 |

NB | 8.25 | 3713000 |

Note: Output for surveys with bootstrap weights will have additional information on precision measures i.e. quality indicators, standard errors, confidence intervals, etc. |

The results in this table can be read as follows:

- The total weighted population associated with the calculation of this table is equal to 27,268,000.
- The ratio of total income over total number of hours worked in Ontario equals to $9.50 per hour. The weighted population associated with this calculation is equal to 428,000.
- The ratio of total income over total number of hours worked in Quebec equals to $9.00 per hour. The weighted population associated with this calculation is equal to 115,000.
- ... etc.