Closed xmarti6 closed 4 years ago
Tangram provides a default transform of "Hmisc" which provides all the preferences of summaryM. All tests are non-parametric. In the first example, the F-statistic is the same by fluke. In the second, the comparison is between an F-statistic of a parametric test and from an F-statistic resulting from a Kruskal-Wallis test. Since all test results are non-parametric there is no need to test for normality.
The test in the "hmisc" transform is definitely not ANOVA.
Also, one is not limited to any default non-parametric test when using the master branch. I'm working with someone to provide matched block tests, with all the default summaries but the p-values come from pairing tests to deal with things like propensity in observational data. Follow along with Issue #50 if you want to change the transforms in the easiest manner.
From Frank Harrell: "The class K-W is a chi-square stat. Chi-square is what you use with infinite denominator d.f. The F stat comes exactly out of doing a regression on rank(y) vs rank(x). The F dist is slightly more accurate for getting p-values for K-W."
So basically the versions of Kruskal-Wallis that are usually taught first have an implicit assumption of infinite degrees of freedom. The F-stat is the more accurate version.
Waww, awesome, these are much more sophisticated tests than I was aware of, many thanks!
They are very good questions to ask. I need to get a paper out that describes these. If you really want to push your stats understanding to the next level, Vanderbilt offers a "Regression Modeling Strategies" short course in the summer.
What I need to do is go back and document better these things and publish. I'm still searching for a good reference on the F-statistic in Kruskal-Wallis statistic if you find one, please post here.
Hi, I recently come up with this strange behaviour, I dont quite understand what's going on, probably something related with maths that I'm not able to decipher.
This dataset works fine:
Created on 2019-09-27 by the reprex package (v0.3.0)
However, if I use this other dataset, the output do not match, which do not happens normally:
Created on 2019-09-27 by the reprex package (v0.3.0)
There is a difference of 1%, not so much, but still can make a difference. If I calculate Anova with other tools they match the "aov()" function with no difference.
Also, if possible, I would like to know whether tangram function checks normality of variables, because according to shapiro and a qqplot over "age", seems rejecting normality assumption, and the test performed by tangram seems to be anova:
Many thanks