本文整理汇总了Python中pyvttbl.DataFrame.chisquare1way方法的典型用法代码示例。如果您正苦于以下问题:Python DataFrame.chisquare1way方法的具体用法?Python DataFrame.chisquare1way怎么用?Python DataFrame.chisquare1way使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyvttbl.DataFrame
的用法示例。
在下文中一共展示了DataFrame.chisquare1way方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test2
# 需要导入模块: from pyvttbl import DataFrame [as 别名]
# 或者: from pyvttbl.DataFrame import chisquare1way [as 别名]
def test2(self):
R="""\
Chi-Square: Single Factor
SUMMARY
1 2 3 4 5
=====================================================
Observed 7 20 23 9 0
Expected 11.800 11.800 11.800 11.800 11.800
CHI-SQUARE TESTS
Value df P
============================================
Pearson Chi-Square 30.746 4 3.450e-06
Likelihood Ratio -- -- --
Observations 59
POST-HOC POWER
Measure
==============================
Effect size w 0.722
Non-centrality lambda 30.746
Critical Chi-Square 9.488
Power 0.998 """
df = DataFrame()
df.read_tbl('data/chi_test.csv')
X=df.chisquare1way('RESULT',{1:11.8 ,2:11.8 ,3:11.8 ,4:11.8 ,5:11.8})
self.assertEqual(str(X),R)
示例2: test1
# 需要导入模块: from pyvttbl import DataFrame [as 别名]
# 或者: from pyvttbl.DataFrame import chisquare1way [as 别名]
def test1(self):
R="""\
Chi-Square: Single Factor
SUMMARY
1 2 3 4
============================================
Observed 7 20 23 9
Expected 14.750 14.750 14.750 14.750
CHI-SQUARE TESTS
Value df P
========================================
Pearson Chi-Square 12.797 3 0.005
Likelihood Ratio 13.288 3 0.004
Observations 59
POST-HOC POWER
Measure
==============================
Effect size w 0.466
Non-centrality lambda 12.797
Critical Chi-Square 7.815
Power 0.865 """
df = DataFrame()
df.read_tbl('data/chi_test.csv')
X=df.chisquare1way('RESULT')
self.assertEqual(str(X),R)
示例3: test2
# 需要导入模块: from pyvttbl import DataFrame [as 别名]
# 或者: from pyvttbl.DataFrame import chisquare1way [as 别名]
def test2(self):
R="""Chi-Square: Single Factor
SUMMARY
1 2 3 4 5
=====================================================
Observed 7 20 23 9 0
Expected 11.800 11.800 11.800 11.800 11.800
CHI-SQUARE TESTS
Value df P
=============================================
Pearson Chi-Square 30.746 4 3.450e-06
Likelihood Ratio nan nan nan
Observations 59 """
df = DataFrame()
df.read_tbl('chi_test.csv')
X=df.chisquare1way('RESULT',{1:11.8 ,2:11.8 ,3:11.8 ,4:11.8 ,5:11.8})
self.assertEqual(str(X),R)
示例4: test1
# 需要导入模块: from pyvttbl import DataFrame [as 别名]
# 或者: from pyvttbl.DataFrame import chisquare1way [as 别名]
def test1(self):
R="""Chi-Square: Single Factor
SUMMARY
1 2 3 4
============================================
Observed 7 20 23 9
Expected 14.750 14.750 14.750 14.750
CHI-SQUARE TESTS
Value df P
========================================
Pearson Chi-Square 12.797 3 0.005
Likelihood Ratio 13.288 3 0.004
Observations 59 """
df = DataFrame()
df.read_tbl('chi_test.csv')
X=df.chisquare1way('RESULT')
self.assertEqual(str(X),R)