Previous Page | Next Page

The SURVEYMEANS Procedure

RATIO Statement
RATIO <’label’> variables / variables ;

The RATIO statement requests ratio analysis for means or proportions of analysis variables. A ratio statement names the variables whose means are used as numerators or denominators in a ratio. Variables appearing before the slash (/), called numerator variables, are used as numerators. Variables appearing after the slash (/), called denominator variables, are used as denominators. These variables can be any number of analysis variables, either continuous or categorical in the input data set, except those named in the BY, CLUSTER, REPWEIGHT, STRATA, and WEIGHT statements.

You can optionally specify a label for each RATIO statement to identify the ratios in the output. Labels must be enclosed in single quotes.

If a RATIO statement does not have any numerator variable or denominator variable specified, the RATIO statement is ignored.

The computation of ratios depends on whether the numerator and denominator variables are continuous or categorical.

For continuous variables, ratios are calculated with the mean of the variables. For example, for continuous variables X, Y, Z, and T, the following RATIO statement requests that the procedure analyze the ratios , , , and :

   ratio x y / z t;

If a continuous variable appears as both a numerator and a denominator variable, the ratio of this variable itself is ignored.

For categorical variables, ratios are calculated with the proportions for the categories of a categorical variable. For example, if the categorical variable Gender has the values 'Male' and 'Female,' with the proportions and , and Y is a continuous variable, then the following RATIO statement requests that the procedure analyze the ratios , , , and :

   ratio Gender y / Gender;

If a categorical variable appears as both a numerator and denominator variable, then the ratios of the proportions for all categories are computed, except the ratio of each category with itself.

You can have more than one RATIO statement. Each RATIO statement produces ratios independently by using its own numerator and denominator variables. Each RATIO statement also produces its own ratio analysis table.

Available statistics for a ratio are as follows:

  • N, number of observations used to compute the ratio

  • NCLU, number of clusters

  • SUMWGT, sum of weights

  • RATIO, ratio

  • STDERR, standard error of ratio

  • VAR, variance of ratio

  • T, t-value of ratio

  • PROBT, p-value of t

  • DF, degrees of freedom of t

  • CLM, two-sided confidence limits of ratio

  • UCLM, one-sided upper confidence limit of ratio

  • LCLM, one-sided lower confidence limit of ratio

The procedure calculates these statistics based on the statistic-keywords that you specified in the PROC SURVEYMEANS statement. If a statistic-keyword is not appropriate for a RATIO statement, that statistic-keyword is ignored. If no valid statistics are requested for a RATIO statement, the procedure computes the ratio and its standard error by default.

Note that ratios within a domain are currently not available.

When the means or proportions for the numerator and denominator variables in a ratio are calculated, an observation is excluded if it has a missing value in either the continuous numerator variable or the denominator variable. An observation with missing values is also excluded for the categorical numerator or denominator variables, unless the MISSING option is used.

When the denominator for a ratio is zero, then the value of the ratio is displayed as '–Infty', 'Infty', or a missing value, depending on whether the numerator is negative, positive, or zero, respectively; and the corresponding internal value is the special missing value '.M', the special missing value '.I', or the usual missing value, respectively.

Previous Page | Next Page | Top of Page