eelbrain.table.stats(y, row, col=None, match=None, sub=None, fmt='%.4g', funcs=[<function mean at 0x7fb40c742a60>], ds=None, title=None, caption=None)

Make a table with statistics

y : Var

Dependent variable.

row : categorial

Model specifying rows

col : categorial | None

Model specifying columns.

funcs : list of callables

A list of statistics functions to show (all functions must take an array argument and return a scalar).

ds : Dataset

If a Dataset is provided, y, row, and col can be strings specifying members.

title : str | FMText

Table title.

caption : str | FMText

Table caption.

table : fmtxt.Table

Table with statistics.


>>> ds = datasets.get_uts()
>>> table.stats('Y', 'A', 'B', ds=ds)
     b0        b1
a0   0.1668    -0.3646
a1   -0.4897   0.8746
>>> table.stats('Y', 'A', ds=ds, funcs=[np.mean, np.std])
Condition   mean     std
a0          0.6691   1.37
a1          0.8596   1.192