eelbrain.NDVar.aggregate

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

Summarize data in each cell of x

Parameters
  • x (Union[Factor, Interaction, NestedEffect, str, None]) – Categorial whose cells define which cases to aggregate.

  • func (Callable) – Function that is used to create a summary of the cases falling into each cell of x. The function needs to accept the data as first argument and axis as keyword-argument. Default is numpy.mean().

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

Returns

NDVar with data aggregated over cells of x.

Return type

aggregated_ndvar