statsmodels.stats.contingency_tables.Table2x2.from_data

classmethod Table2x2.from_data(data, shift_zeros=True)[source]

Construct a Table object from data.

Parameters
dataarray_like

The raw data, the first column defines the rows and the second column defines the columns.

shift_zerosbool

If True, and if there are any zeros in the contingency table, add 0.5 to all four cells of the table.