PING
0.9
Statistical data handling and processing in production environment
|
Compare the ratio of two populations (given as figures) with a given threshold.
pop_den, pop_num
: two (string/numeric) variables, usually storing respectively the global and partial population figures to compare;pop_thres
: (option) value (in range [0,1]) of the threshold to test whether: pop_num / pop_den >= pop_thres
? default to 0.7 (i.e. we assume pop_den > pop_num
and pop_num
should be at least 70% of pop_den
)._pop_infl_
: name of the macro variables storing the 'inflation' rate between both global and partial population, i.e. the ratio pop_den / pop_num
;_ans_
: name of the macro variables storing the result of the test whhether some aggregates shall be computed or not, i.e. the result (YES/NO
) of the test: pop_num / pop_den >= pop_thres
?Alleluia!!!
returns pop_infl=10
and ans=no
.
returns pop_infl=5
and ans=yes
(note that we indeed test >=
).
returns pop_infl=2
and ans=yes
.
Run macro %_example_population_compare
for more examples.