当前位置: 首页>>代码示例>>Python>>正文


Python DataFrame.anova方法代码示例

本文整理汇总了Python中pyvttbl.DataFrame.anova方法的典型用法代码示例。如果您正苦于以下问题:Python DataFrame.anova方法的具体用法?Python DataFrame.anova怎么用?Python DataFrame.anova使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyvttbl.DataFrame的用法示例。


在下文中一共展示了DataFrame.anova方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test02

# 需要导入模块: from pyvttbl import DataFrame [as 别名]
# 或者: from pyvttbl.DataFrame import anova [as 别名]
 def test02(self):
     """using loftus and masson error bars"""
     
     # a simple plot
     df=DataFrame()
     df.read_tbl('data/words~ageXcondition.csv')
     aov = df.anova('WORDS', wfactors=['AGE','CONDITION'])
     aov.plot('WORDS','AGE', seplines='CONDITION',
              errorbars='ci', output_dir='output')
开发者ID:marsja,项目名称:pyvttbl,代码行数:11,代码来源:test_plotting_interaction_plot.py

示例2: test1

# 需要导入模块: from pyvttbl import DataFrame [as 别名]
# 或者: from pyvttbl.DataFrame import anova [as 别名]
 def test1(self):
     df=DataFrame()
     fname='error~subjectXtimeofdayXcourseXmodel.csv'
     df.read_tbl(fname)
     aov=df.anova('ERROR',wfactors=['TIMEOFDAY','COURSE','MODEL'])#,transform='windsor05')
     aov.output2html(fname[:-4]+'RESULTS.htm')
开发者ID:flavour,项目名称:cert,代码行数:8,代码来源:test_stats.py

示例3: test1

# 需要导入模块: from pyvttbl import DataFrame [as 别名]
# 或者: from pyvttbl.DataFrame import anova [as 别名]

#.........这里部分代码省略.........
Error(COURSE *      Sphericity Assumed      3.593       -   6.588     0.545                                                                            
MODEL)              Greenhouse-Geisser      3.593   0.327   2.153     1.669                                                                            
                    Huynh-Feldt             3.593   0.327   2.153     1.669                                                                            
                    Box                     3.593   0.500   3.294     1.091                                                                            
------------------------------------------------------------------------------------------------------------------------------------------------------
TIMEOFDAY *         Sphericity Assumed      2.222       -       4     0.556      1.318       0.355   0.063      3   0.458    0.898       2.400   0.125 
COURSE *            Greenhouse-Geisser      2.222   0.336   1.343     1.654      1.318       0.387   0.063      3   0.458    0.898       2.400   0.080 
MODEL               Huynh-Feldt             2.222   0.336   1.343     1.654      1.318       0.387   0.063      3   0.458    0.898       2.400   0.080 
                    Box                     2.222   0.500       2     1.111      1.318       0.380   0.063      3   0.458    0.898       2.400   0.093 
------------------------------------------------------------------------------------------------------------------------------------------------------
Error(TIMEOFDAY *   Sphericity Assumed      2.778       -   6.588     0.422                                                                            
COURSE *            Greenhouse-Geisser      2.778   0.336   2.212     1.256                                                                            
MODEL)              Huynh-Feldt             2.778   0.336   2.212     1.256                                                                            
                    Box                     2.778   0.500   3.294     0.843                                                                            

TABLES OF ESTIMATED MARGINAL MEANS

Estimated Marginal Means for TIMEOFDAY
TIMEOFDAY   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
==================================================================
T1          5.704        0.433             4.855             6.552 
T2          2.593        0.215             2.171             3.014 

Estimated Marginal Means for COURSE
COURSE   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
===============================================================
C1       5.167        0.584             4.021             6.312 
C2       4.444        0.532             3.403             5.486 
C3       2.833        0.414             2.021             3.645 

Estimated Marginal Means for MODEL
MODEL   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
==============================================================
M1      5.222        0.645             3.959             6.485 
M2      4.278        0.535             3.229             5.327 
M3      2.944        0.328             2.301             3.588 

Estimated Marginal Means for TIMEOFDAY * COURSE
TIMEOFDAY   COURSE   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
===========================================================================
T1          C1       7.111        0.588             5.959             8.263 
T1          C2           6        0.726             4.576             7.424 
T1          C3           4        0.577             2.868             5.132 
T2          C1       3.222        0.401             2.437             4.007 
T2          C2       2.889        0.261             2.378             3.400 
T2          C3       1.667        0.236             1.205             2.129 

Estimated Marginal Means for TIMEOFDAY * MODEL
TIMEOFDAY   MODEL   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
==========================================================================
T1          M1      7.222        0.760             5.733             8.711 
T1          M2      6.111        0.512             5.107             7.115 
T1          M3      3.778        0.465             2.867             4.689 
T2          M1      3.222        0.434             2.372             4.073 
T2          M2      2.444        0.338             1.782             3.107 
T2          M3      2.111        0.261             1.600             2.622 

Estimated Marginal Means for COURSE * MODEL
COURSE   MODEL   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
=======================================================================
C1       M1      6.500        0.992             4.556             8.444 
C1       M2      5.167        1.195             2.825             7.509 
C1       M3      3.833        0.601             2.656             5.011 
C2       M1          6        1.095             3.853             8.147 
C2       M2      4.167        0.792             2.614             5.720 
C2       M3      3.167        0.477             2.231             4.102 
C3       M1      3.167        0.872             1.457             4.877 
C3       M2      3.500        0.764             2.003             4.997 
C3       M3      1.833        0.307             1.231             2.436 

Estimated Marginal Means for TIMEOFDAY * COURSE * MODEL
TIMEOFDAY   COURSE   MODEL   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
===================================================================================
T1          C1       M1      8.667        0.333             8.013             9.320 
T1          C1       M2      7.667        0.333             7.013             8.320 
T1          C1       M3          5        0.577             3.868             6.132 
T1          C2       M1      8.333        0.667             7.027             9.640 
T1          C2       M2      5.667        0.882             3.938             7.395 
T1          C2       M3          4        0.577             2.868             5.132 
T1          C3       M1      4.667        1.202             2.311             7.022 
T1          C3       M2          5        0.577             3.868             6.132 
T1          C3       M3      2.333        0.333             1.680             2.987 
T2          C1       M1      4.333        0.333             3.680             4.987 
T2          C1       M2      2.667        0.882             0.938             4.395 
T2          C1       M3      2.667        0.333             2.013             3.320 
T2          C2       M1      3.667        0.333             3.013             4.320 
T2          C2       M2      2.667        0.333             2.013             3.320 
T2          C2       M3      2.333        0.333             1.680             2.987 
T2          C3       M1      1.667        0.333             1.013             2.320 
T2          C3       M2          2        0.577             0.868             3.132 
T2          C3       M3      1.333        0.333             0.680             1.987 

"""
        
        df=DataFrame()
        fname='data/error~subjectXtimeofdayXcourseXmodel.csv'
        df.read_tbl(fname)
        aov=df.anova('ERROR',wfactors=['TIMEOFDAY','COURSE','MODEL'],transform='windsor05')
##        print(aov)
        self.assertEqual(str(aov),R)
开发者ID:marsja,项目名称:pyvttbl,代码行数:104,代码来源:test_stats_anova_transform.py

示例4: test0

# 需要导入模块: from pyvttbl import DataFrame [as 别名]
# 或者: from pyvttbl.DataFrame import anova [as 别名]

#.........这里部分代码省略.........
-----------------------------------------------------------------------------------------------------------------------------------------------------
Error(COURSE *      Sphericity Assumed      4.667       -       8     0.583                                                                           
MODEL)              Greenhouse-Geisser      4.667   0.354   2.830     1.649                                                                           
                    Huynh-Feldt             4.667   0.354   2.830     1.649                                                                           
                    Box                     4.667   0.500       4     1.167                                                                           
-----------------------------------------------------------------------------------------------------------------------------------------------------
TIMEOFDAY *         Sphericity Assumed      2.778       -       4     0.694      1.923       0.200   0.067      3   0.408    0.800      2.885   0.152 
COURSE *            Greenhouse-Geisser      2.778   0.290   1.159     2.397      1.923       0.293   0.067      3   0.408    0.800      2.885   0.087 
MODEL               Huynh-Feldt             2.778   0.290   1.159     2.397      1.923       0.293   0.067      3   0.408    0.800      2.885   0.087 
                    Box                     2.778   0.500       2     1.389      1.923       0.260   0.067      3   0.408    0.800      2.885   0.109 
-----------------------------------------------------------------------------------------------------------------------------------------------------
Error(TIMEOFDAY *   Sphericity Assumed      2.889       -       8     0.361                                                                           
COURSE *            Greenhouse-Geisser      2.889   0.290   2.318     1.246                                                                           
MODEL)              Huynh-Feldt             2.889   0.290   2.318     1.246                                                                           
                    Box                     2.889   0.500       4     0.722                                                                           

TABLES OF ESTIMATED MARGINAL MEANS

Estimated Marginal Means for TIMEOFDAY
TIMEOFDAY   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
==================================================================
T1          5.778        0.457             4.882             6.674 
T2          2.556        0.229             2.108             3.003 

Estimated Marginal Means for COURSE
COURSE   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
===============================================================
C1       5.222        0.608             4.031             6.414 
C2       4.500        0.562             3.399             5.601 
C3       2.778        0.432             1.931             3.625 

Estimated Marginal Means for MODEL
MODEL   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
==============================================================
M1      5.333        0.686             3.989             6.678 
M2      4.222        0.558             3.129             5.315 
M3      2.944        0.328             2.301             3.588 

Estimated Marginal Means for TIMEOFDAY * COURSE
TIMEOFDAY   COURSE   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
===========================================================================
T1          C1       7.222        0.641             5.966             8.478 
T1          C2       6.111        0.790             4.564             7.659 
T1          C3           4        0.577             2.868             5.132 
T2          C1       3.222        0.401             2.437             4.007 
T2          C2       2.889        0.261             2.378             3.400 
T2          C3       1.556        0.294             0.979             2.132 

Estimated Marginal Means for TIMEOFDAY * MODEL
TIMEOFDAY   MODEL   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
==========================================================================
T1          M1      7.444        0.835             5.807             9.081 
T1          M2      6.111        0.512             5.107             7.115 
T1          M3      3.778        0.465             2.867             4.689 
T2          M1      3.222        0.434             2.372             4.073 
T2          M2      2.333        0.408             1.533             3.133 
T2          M3      2.111        0.261             1.600             2.622 

Estimated Marginal Means for COURSE * MODEL
COURSE   MODEL   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
=======================================================================
C1       M1      6.667        1.085             4.540             8.794 
C1       M2      5.167        1.195             2.825             7.509 
C1       M3      3.833        0.601             2.656             5.011 
C2       M1      6.167        1.195             3.825             8.509 
C2       M2      4.167        0.792             2.614             5.720 
C2       M3      3.167        0.477             2.231             4.102 
C3       M1      3.167        0.872             1.457             4.877 
C3       M2      3.333        0.882             1.605             5.062 
C3       M3      1.833        0.307             1.231             2.436 

Estimated Marginal Means for TIMEOFDAY * COURSE * MODEL
TIMEOFDAY   COURSE   MODEL   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
===================================================================================
T1          C1       M1          9        0.577             7.868            10.132 
T1          C1       M2      7.667        0.333             7.013             8.320 
T1          C1       M3          5        0.577             3.868             6.132 
T1          C2       M1      8.667        0.882             6.938            10.395 
T1          C2       M2      5.667        0.882             3.938             7.395 
T1          C2       M3          4        0.577             2.868             5.132 
T1          C3       M1      4.667        1.202             2.311             7.022 
T1          C3       M2          5        0.577             3.868             6.132 
T1          C3       M3      2.333        0.333             1.680             2.987 
T2          C1       M1      4.333        0.333             3.680             4.987 
T2          C1       M2      2.667        0.882             0.938             4.395 
T2          C1       M3      2.667        0.333             2.013             3.320 
T2          C2       M1      3.667        0.333             3.013             4.320 
T2          C2       M2      2.667        0.333             2.013             3.320 
T2          C2       M3      2.333        0.333             1.680             2.987 
T2          C3       M1      1.667        0.333             1.013             2.320 
T2          C3       M2      1.667        0.882            -0.062             3.395 
T2          C3       M3      1.333        0.333             0.680             1.987 

"""
        df=DataFrame()
        fname='data/error~subjectXtimeofdayXcourseXmodel.csv'
        df.read_tbl(fname)
        aov=df.anova('ERROR',wfactors=['TIMEOFDAY','COURSE','MODEL'])
##        print(aov)
        self.assertEqual(str(aov),R)
开发者ID:marsja,项目名称:pyvttbl,代码行数:104,代码来源:test_stats_anova_within.py

示例5: test3

# 需要导入模块: from pyvttbl import DataFrame [as 别名]
# 或者: from pyvttbl.DataFrame import anova [as 别名]

#.........这里部分代码省略.........
                        Huynh-Feldt             0.386       1       63   0.006                                                                         
                        Box                     0.386   0.167   10.500   0.037                                                                         

TABLES OF ESTIMATED MARGINAL MEANS

Estimated Marginal Means for CYCLE
CYCLE   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
==============================================================
1       0.220        0.022             0.177             0.262 
2       0.306        0.022             0.263             0.349 
3       0.307        0.024             0.259             0.354 
4       0.308        0.026             0.257             0.359 

Estimated Marginal Means for PHASE
PHASE   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
==============================================================
I       0.207        0.014             0.180             0.234 
II      0.363        0.016             0.332             0.394 

Estimated Marginal Means for GROUP
GROUP   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
==============================================================
AA      0.222        0.018             0.187             0.256 
AB      0.292        0.022             0.250             0.334 
LAB     0.341        0.020             0.302             0.381 

Estimated Marginal Means for CYCLE * PHASE
CYCLE   PHASE   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
======================================================================
1       I       0.173        0.028             0.119             0.228 
1       II      0.266        0.031             0.206             0.326 
2       I       0.224        0.026             0.173             0.275 
2       II      0.387        0.027             0.335             0.439 
3       I       0.223        0.027             0.170             0.276 
3       II      0.391        0.032             0.327             0.454 
4       I       0.207        0.031             0.146             0.269 
4       II      0.408        0.030             0.350             0.466 

Estimated Marginal Means for CYCLE * GROUP
CYCLE   GROUP   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
======================================================================
1       AA      0.193        0.046             0.104             0.282 
1       AB      0.177        0.025             0.128             0.225 
1       LAB     0.289        0.035             0.221             0.358 
2       AA      0.253        0.033             0.187             0.318 
2       AB      0.323        0.035             0.254             0.392 
2       LAB     0.341        0.044             0.256             0.427 
3       AA      0.219        0.036             0.149             0.289 
3       AB      0.331        0.039             0.255             0.406 
3       LAB     0.371        0.044             0.285             0.456 
4       AA      0.223        0.026             0.172             0.273 
4       AB      0.337        0.057             0.225             0.449 
4       LAB     0.364        0.040             0.287             0.442 

Estimated Marginal Means for PHASE * GROUP
PHASE   GROUP   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
======================================================================
I       AA      0.209        0.024             0.162             0.255 
I       AB      0.179        0.023             0.134             0.225 
I       LAB     0.233        0.026             0.183             0.283 
II      AA      0.235        0.026             0.184             0.286 
II      AB      0.404        0.023             0.359             0.450 
II      LAB     0.450        0.016             0.419             0.481 

Estimated Marginal Means for CYCLE * PHASE * GROUP
CYCLE   PHASE   GROUP   Mean    Std. Error   95% Lower Bound   95% Upper Bound 
==============================================================================
1       I       AA      0.177        0.060             0.060             0.295 
1       I       AB      0.126        0.036             0.056             0.196 
1       I       LAB     0.216        0.047             0.124             0.309 
1       II      AA      0.209        0.072             0.067             0.351 
1       II      AB      0.228        0.025             0.179             0.276 
1       II      LAB     0.363        0.038             0.288             0.437 
2       I       AA      0.224        0.039             0.148             0.300 
2       I       AB      0.235        0.049             0.139             0.331 
2       I       LAB     0.214        0.053             0.110             0.317 
2       II      AA      0.281        0.055             0.173             0.389 
2       II      AB      0.411        0.026             0.360             0.463 
2       II      LAB     0.469        0.026             0.417             0.520 
3       I       AA      0.231        0.057             0.120             0.342 
3       I       AB      0.200        0.031             0.140             0.260 
3       I       LAB     0.238        0.054             0.133             0.342 
3       II      AA      0.208        0.047             0.115             0.300 
3       II      AB      0.461        0.024             0.414             0.508 
3       II      LAB     0.504        0.016             0.472             0.535 
4       I       AA      0.203        0.039             0.126             0.279 
4       I       AB      0.156        0.062             0.036             0.277 
4       I       LAB     0.264        0.058             0.149             0.378 
4       II      AA      0.242        0.034             0.176             0.309 
4       II      AB      0.517        0.031             0.457             0.578 
4       II      LAB     0.465        0.020             0.425             0.505 

"""
        df=DataFrame()
        fname='data/suppression~subjectXgroupXcycleXphase.csv'
        df.read_tbl(fname)
        df['SUPPRESSION']=[.01*x for x in df['SUPPRESSION']]
        aov=df.anova('SUPPRESSION',wfactors=['CYCLE','PHASE'],bfactors=['GROUP'])
##        print(aov)
        self.assertEqual(str(aov),R)
开发者ID:marsja,项目名称:pyvttbl,代码行数:104,代码来源:test_stats_anova_mixed.py


注:本文中的pyvttbl.DataFrame.anova方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。