def param_ttest(X, Y):
"""
Two-sample t-test for difference between parameters (actual and estimated)
Parameters
----------
X : ndarray(shape=(n_subjects, nparams))
Y : ndarray(shape=(n_subjects, nparams))
Returns
-------
res : ndarray(shape=(n_params, 2))
(t-statistic, p-value)
Notes
-----
Arrays ``X`` and ``Y`` must be the same size
"""
nparams = np.shape(X)[1]
res = np.zeros([nparams, 2])
for j in range(nparams):
res[j, :] = ttest_ind(X[:,j], Y[:,j])
return res
评论列表
文章目录