I was trying to calculate t-statistics using Python's scipy
and numpy as np
-
scipy.stats.ttest_ind_from_stats(
NP.mean(x[['GSM1224991', 'GSM1224992']]),
NP.std(x[['GSM1224991', 'GSM1224992']]),
len(['GSM1224991', 'GSM1224992']),
NP.mean(x[['GSM1224993', 'GSM1224994']]),
NP.std(x[['GSM1224993', 'GSM1224994']]),
len(['GSM1224993', 'GSM1224994']),
)
For example in the dataset given below, GSM1224991 & GSM1224992
are in first group and GSM1224993 & GSM1224994
form second group.
ID_REF,GSM1224991,GSM1224992,GSM1224993,GSM1224994
148000,6.436150368369428,6.499787040655854,4.430816798843313,3.0819099697950434
Here is the calculation given in GEO2R analysis for the same reference but while I calculate t test it is 0.029630766122806237
instead of -0.33768
something as shown below.
ID adj.P.Val P.Value t B logFC
148000 1 0.001426 -9.44 -0.33768 -2.513
How to calculate t-stat here? Or considering single row is wrong approach?