Skip to content
Aurélien Cavelan edited this page Aug 25, 2026 · 1 revision

Monitoring of sub-populations and cohorts

Monitoring of sub-populations (version 32 on)

As of schema 32, multiple subpopulations may be monitored in surveys (but not in continuous output).
Each of the monitored subpopulations must first be defined, either implicitly, by an intervention within the element, or explicitly by the recruitment only pseudo-intervention.

Each of the subpopulations needs to be specified in the "cohorts" element, which links a subpopulation number to the id assigned when the subpopulation was declared in the "component" element:

    <cohorts>
      <subPop id="StudycohortA" number="1"/>
      <subPop id="StudycohortB" number="2"/>
      <subPop id="StudycohortB" number="4"/>
      ....
    </cohorts>

The number must be a power of 2 (i.e. 1, 2, 4, 8, ...). These numbers are used to label the output in the output.txt file.

If only a single subpopulation is listed, the corresponding output set in the output.txt file is identified by multiplying the number by 1000. This increment is then added to the values in the column usually reserved for age Group, corresponding to this subpopulation. The values for the complementary sub-population (those not included) retain the standard values in the age-group column.

Where multiple sub-populations are listed, output is segregated according to all combinations of membership: e.g. if sub-populations A (number=1) and B (number=2) are listed, there will be outputs for "member of A and B"(increment=3000); "member of A but not B"(increment=1000);, "B but not A"(increment=2000); and "not a member of A or B"(increment=0). A corresponding rule is used to assign increment values to all 8 combinations if three sub-populations are listed (each is further segregated by age groups, survey times and enabled output measures, which could lead to excessive program memory usage and output file size if many subpopulations are listed).

Monitoring of cohorts (Versions before 32)

To monitor a defined cohort only, in Versions before 32, cohortOnly is set to "true" as follows:

<monitoring name="(some description or name)" cohortOnly="true">
  <continuous ... />
  <SurveyOptions ... />
  <surveys ... />
  <ageGroup ... />
</monitoring>

cohortOnly works only for versions up to 31 and has been removed in schema version 32. It may be assigned values true or false or, if not using cohorts (with Versions 32 or above), omitted entirely.

If cohortOnly is set to true, then the output of most measures are restricted to the cohort (although not quite all; see the list of measures for details); if it is set to false or omitted, then these measures act on the entire simulated population. To obtain outputs for both the cohort and the entire population prior to version 32 the simulation must be run twice.

Clone this wiki locally