statsmodels.stats.contingency_tables.SquareTable.from_data

classmethod SquareTable.from_data(data, shift_zeros=True)

从数据构建一个Table对象。

Parameters:
dataarray_like

原始数据,使用前两列构建列联表。

shift_zerosbool

如果为真且任意单元格计数为零,则将0.5添加到表中的所有值。

Returns:
A Table instance.

Last update: Oct 16, 2024