tompollard / tableone

Create "Table 1" for research papers in Python
https://pypi.python.org/pypi/tableone/
MIT License
164 stars 41 forks source link

Implement visualization of test statistic, degrees of freedom and corresponding p-value #105

Open JohannesWiesner opened 4 years ago

JohannesWiesner commented 4 years ago

TableOne currently seems to visualize the respective hypothesis-tests using whole words (i.e. Two Sample T-test, Chi-squared). It would be nice if the respective test statistic, the degrees of freedom and the p-value could also be printed out in a separate column (sticking to APA convention):

Statistic
--------------------
t(28) = 2.6, p < .05
tompollard commented 4 years ago

@JohannesWiesner great suggestion, thanks! we'll take a look at this.

JohannesWiesner commented 4 years ago

In the meantime (until this might be implemented in the future), is there a way to already obtain the test statistics and degrees of freedom from the TableOne() instance? I guess, TableOne uses something like scipy.stats.ttest_ind in the backend and the output is somehow saved as an attribute?