1. The RTRA mean procedure produces the average for a continuous variable. For example, this procedure can be used to calculate the average income of those with different education levels and gender. To generate a mean, call the following RTRA procedure:
2. %RTRAMean 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 five variables for the dimensions of the mean 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.
AnalysisVarList = identify a maximum of three variables for the mean procedure. These variables must be of type numeric. Each of these variables must contain at least four unique values. These variables need to be delimited by spaces or asterisks.
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 average income. Suppose you ran the following RTRA procedure to calculate the mean of a variable called “Income” for a table named “Table1”. You would like to calculate this average for different education levels and gender using variables called “Education” and “Sex”.
Your RTRA procedure call will look like this:
The following table displays results from the example procedure above.
|Above high school||Female||35000||60|
|Above high school||Male||50000||55|
|Below high school||Female||25000||40|
|Below high school||Male||30000||45|
|Note: Output for surveys with bootstrap weights will have additional information on precision measures i.e. quality indicators, standard errors, confidence intervals, etc.|