summary.proportionTrue Function (GPL)

Syntax

summary.proportionTrue(<algebra>)

or

summary.proportionTrue(<binning function>)

or

summary.proportionTrue(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.proportionTrue.

Description

Calculate the proportion of cases within each subgroup that evaluate to a true value compared to the total number of cases. This function is similar to summary.percentTrue except it reports a value between 0 and 1 instead of 0 and 100. If summary.proportionTrue is evaluating graph algebra, the analysis variable is typically the Boolean result of expression evaluated by the eval function. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra .

Examples

Figure 1. Example: Plotting proportion greater than a value
TRANS: salGreaterThan = eval(salary>50000)
ELEMENT: interval(position(summary.proportionTrue(jobcat*salGreaterThan)))

Statistic Functions

See GPL Functions .