Download the DOC version (DOC, 38 KB)

1. The RTRA proportion procedure calculates the population distribution of a **discrete** variable. For example, this procedure can be used to calculate the proportion of the population living with asthma. To generate a proportion, call the following RTRA procedure:

**%RTRAProportion (**

InputDataset=,

OutputName=,

ClassVarList=,

ByVar=,

UserWeight=);

2. **%RTRAProportion** 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 not be an underscore).

**ClassVarList** = identify a maximum of four variables for the dimensions of the proportion 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. This parameter may be left empty if you wish to calculate a proportion for the entire population.

**ByVar** = identify exactly one variable for the proportion procedure. This variable must contain more than one but no more than 500 unique values. Your population distribution will be calculated on this discrete variable.

**UserWeight**= refer to the RTRA parameters document to identify a survey weight. The weight variable identified will be merged to the InputDataset using the ID variable.

3. Example: This procedure can be used to calculate the proportion of population living with asthma. Suppose you ran the following RTRA procedure to calculate a proportion of a variable called “Asthma” to generate a table named “Table1”. You would like to calculate this proportion for each gender using variable called “Sex”.

**%RTRAProportion (**

InputDataset=work.CCHS,

OutputName=Table1,

ClassVarList=Sex,

ByVar=Asthma,

UserWeight=Finalwt);

The following table displays results from the example procedure above.

Sex | Asthma | _Proportion_ | _Count_ |
---|---|---|---|

200 | |||

Yes | 0.10 | 20 | |

No | 0.90 | 180 | |

Female | 110 | ||

Female | Yes | 0.09 | 10 |

Female | No | 0.91 | 100 |

Male | 90 | ||

Male | Yes | 0.11 | 10 |

Male | No | 0.89 | 80 |