Differences between revisions 2 and 4 (spanning 2 versions)
Revision 2 as of 2005-10-04 15:13:09
Size: 106
Editor: 211
Comment:
Revision 4 as of 2011-08-03 11:01:00
Size: 537
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
다음처럼 쉽게 p-value를 구할 수 있다.
  * T-Test
{{{#!python
from rpy import *
x = [1,2,3,4,5,6,7,8,9,10]
y = [2,2,3,3,4,4]
result = r.t_test(x,y)
print result['p.value']
}}}
  * F-Test
{{{#!python
from rpy import *
x = [1,2,3,4,5,6,7,8,9,10]
y = [2,2,3,3,4,4]
result = r.var_test(x,y,alternative='greater') # alternative가 없으면 default로 two-sided test가 된다.
print result['p.value']
}}}

RPy is a [Python] interface to [R] package

http://rpy.sourceforge.net

다음처럼 쉽게 p-value를 구할 수 있다.

  • T-Test

   1 from rpy import *
   2 x = [1,2,3,4,5,6,7,8,9,10]
   3 y = [2,2,3,3,4,4]
   4 result = r.t_test(x,y)
   5 print result['p.value']
  • F-Test

   1 from rpy import *
   2 x = [1,2,3,4,5,6,7,8,9,10]
   3 y = [2,2,3,3,4,4]
   4 result = r.var_test(x,y,alternative='greater') # alternative가 없으면 default로 two-sided test가 된다.
   5 print result['p.value']


CategoryProgramLibrary

RPy (last edited 2011-09-08 08:02:54 by 211)

web biohackers.net