StratifiedTable.from_data()

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 or string

The column index or name of data containing the variable defining the rows of the contingency table. The variable must have only two distinct values.

var2 : int or string

The column index or name of data containing the variable defining the columns of the contingency table. The variable must have only two distinct values.

strata : int or string

The column index of name of data containing the variable defining the strata.

data : array-like

The raw data. A cross-table for analysis is constructed from the first two columns.

Returns:

A StratifiedTable instance.

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.stats.contingency_tables.StratifiedTable.from_data.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部