Be careful when creating a merged variable grouping that includes population and non-population variables in its definition. For example, consider a definition which contains sex-specific cancer sites. Suppose you want a grouping which includes female breast cancer cases and cervical cancer cases. Since cervix cancer only occurs in females, the following definition would work in a frequency session:
(sex = female and site = breast) or site = cervix
However, if used to calculate rates or prevalence percents, the denominators would not be correct. Any part of the expression that does not apply to the population data is evaluated as true when processing the population data. Therefore, for population data this grouping would always be evaluated as true.
(sex = female and site = breast) or site = cervix
(sex = female and TRUE) or TRUE
TRUE
Therefore, the denominator will incorrectly contain both males and females. To correct this problem, change the selection statement as follows:
sex = female and (site = breast or site = cervix)
This new selection statement will be evaluated for the population file subset in this way:
sex = female and (site = breast or site = cervix)
sex = female and (TRUE or TRUE)
sex = female
This is the intended denominator.