Differences between revisions 1 and 4 (spanning 3 versions)
Revision 1 as of 2005-10-04 14:51:35
Size: 74
Editor: 211
Comment: added about RPy
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 4: Line 4:

다음처럼 쉽게 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']
}}}

----
CategoryProgramLibrary

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