eitanhemed / robusta Goto Github PK
View Code? Open in Web Editor NEWStatistical hypothesis testing in Python, using R
Home Page: https://EitanHemed.github.io./robusta
License: GNU General Public License v3.0
Statistical hypothesis testing in Python, using R
Home Page: https://EitanHemed.github.io./robusta
License: GNU General Public License v3.0
Issue
When fitting a two-samples t-test using the formula interface, it is required to also provide the paired
kwarg, although it should be inferred from the formula.
How to reproduce
import robusta as rst
m = rst.groupwise.groupwise_models.T2SamplesModel(data=rst.load_dataset('sleep'), formula='extra~group|ID')
m.fit()
Output
NotImplementedError: Conversion 'py2rpy' not defined for objects of type '<class 'NoneType'>'
Expected Output
Issue
Cohen's-d effect size is miscalculated, resulting in larger effect size estimates.
How to reproduce
import robusta as rst
print(rst.groupwise.T2Samples(
data=rst.load_dataset('sleep'), independent='group',
dependent='extra', subject='ID', paired=True, tail='less').report_table().round(2))
t | df | p-value | Cohen-d Low | Cohen-d | Cohen-d High |
---|---|---|---|---|---|
-4.062 | 9.0 | 0.001 | -4.986 | -2.708 | -0.351 |
Expected Output
In R:
res = data.frame(tidy(t.test(extra ~ group, data=sleep, paired=T, alternative='less')
res$statistic / sqrt(res$parameter) # d = t / sqrt(N) ~ -1.35
Proposed Solution
The problem arises from rst.groupwise.results.TTestResults
, where the usage of psych.t2d to calculate effect size is misguided. We should opt to use the 'n1and
n2(degrees of freedom based on each group size) kwargs rather than
n` (total degrees of freedom in sample), to get the right values.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.