*Selection of an initial configuration*. Before starting the process of aggregating the cases, the program selects the initial configuration, i.e.*t*initial group profiles, in either one of the following ways:

·
Case profiles
of *t* cases, selected randomly (using random numbers), constitute the
starting configuration; in order to obtain the initial configuration,
the remaining cases are distributed into *t*-groups.

·
Case profiles
of *t* cases, selected in a stepwise manner, constitute the starting
configuration; in order to obtain the initial configuration.

- The initial configuration is a set of group
profiles calculated for cases distributed across categories of a key
variable;
- The initial configuration is a set of
*a priori*group profiles provided by the researcher.

When the construction starts from *t* case
profiles, the program considers this set of *t* vectors as a set of *t*
‘starting cases’ and distributes the remaining cases according to
their distance to each of the starting case.

Denote the set of *t* starting cases by

and the distance between groups and/or cases *i** *and *j* by *D(P _{ii},P_{j}).*

*Note *that *D(**P _{i},
P_{j})* can be any distance - City block
distance, Euclidean distance or Chi-square distance.

For each case the program calculates

There are two possibilities:

- b £ g :
case
*i*is assigned to the closest group,*P*_{kj}and the profile is recalculated

- b > g :
case
*i*forms a new group which is added to the set*P*_{starting}, and the two closest profiles*P*_{kj}and*P*_{kj}_{’}are aggregated forming one group with the new profile

At the end of this procedure, the initial configuration is a set of *t*
profiles

where *P*_{j}
is a mean profile of all the cases belonging to the group *j*.

At this stage the program does not take into account weighting of cases, if any.

*Stabilization of the initial configuration*. The initial configuration is stabilized by an iterative process. During each iteration, the program redistributes the cases among initial groups taking into account their distances to each group profile.

Here, again there are two possibilities:

- when case and

then this case remains in
the group *P*_{j};

- when case but

then the case *i* is
moved from the group *P*_{j} to the
group *P*_{j}, and the profiles of those
two groups are recalculated as follows:

After this operation, the group *P _{j}*
contains

The procedure is repeated until the groups are stabilized or when the number of iterations fixed by the researcher is reached. Stability of groups is measured by the percentage of cases that do not change groups between two subsequent iterations.