eelbrain.Var.aggregate

Var.aggregate(x, func=<function mean>, name=None)

Summarize cases within cells of x

Parameters
  • x (Union[Factor, Interaction, NestedEffect, str]) – Model defining cells in which to aggregate.

  • func (Callable) – Function that converts arrays into scalars, used to summarize data within each cell of x.

  • name (Optional[str]) – Name of the output (default is the current name).

Returns

A Var instance with a single value for each cell in x.

Return type

aggregated_var