statsmodels.stats.contingency_tables.StratifiedTable.from_data¶
- classmethod StratifiedTable.from_data(var1, var2, strata, data)[source]¶
Construct a StratifiedTable object from data.
- Parameters:¶
- var1
int
orstr
The column index or name of data specifying the variable defining the rows of the contingency table. The variable must have only two distinct values.
- var2
int
orstr
The column index or name of data specifying the variable defining the columns of the contingency table. The variable must have only two distinct values.
- strata
int
orstr
The column index or name of data specifying the variable defining the strata.
- dataarray_like
The raw data. A cross-table for analysis is constructed from the first two columns.
- var1
- Returns:¶
Last update:
Oct 03, 2024