IDEMSInternational / R-Instat

A statistics software package powered by R
http://r-instat.org/
GNU General Public License v3.0
38 stars 102 forks source link

|Adding the coin package for more hypothesis tests #4460

Closed rdstern closed 4 years ago

rdstern commented 6 years ago

The coin package looks interesting for us. I have included Lily in case it could be useful for her MSc project? It is mentioned in the clinical trials and survival task views and so just may be of some interest to consider. More generally, for us it includes a pretty general system for hypothesis testing. It looks to be as close as hypothesis testing can get to our ideas of looking for general methods.

We now have an obvious place to start looking at it, namely as a keyboard in our hypothesis testing dialogue - and I have been on the lookout for useful extra packages/keyboards. It also has an interesting set of example data sets.

The keyboard could be sensibly structured with categories of tests, namely 1) Contingency Tests, (4) 2) Correlation Tests (4) 3) Location Tests (6) 4) Scale Tests (6) 5) Survival Tests (1) 6) Symmetry Tests (4) There are also a few additional individual tests, etc, so this may become 2 keyboards.

This package seems obvious enough for the future that I suggest we include it in Version 4.12, but leave the coding etc to later. Then if anyone does want to use those tests they would be available, through the hypothesis testing dialogue, though not on a keyboard.

rdstern commented 6 years ago

I am not sure whether this still fits with Lily's proposed MSc project? If so, (or anyway) and she doesn't have time to do it, then it could still be a useful task for someone from the AMI team. I have changed the milestone back to 5.1, i.e. mid-September. That's because I have a higher priority for this dialogue.

We already have 3 keyboards in this dialogue and this adds further useful tests that may be also of interest in Jane Hutton's course for the AIMS students?

rdstern commented 6 years ago

I have looked again at the coin package and suggest mentioning it might be useful in the Conclusions and further work in Lily's project. There could even be a table of the data sets, perhaps in order of the number of variables. There are 16 examples, 6 have 2 variables, 5 have 3 variables and the others have 4, 6, 7, 8, 10.

Also interesting is that 2 of the examples with 2 variables have 7477 and 32574 cases. This may be fun to illustrate the use of a significance test, but it must be incredibly rare that a study of 30,000 cases is usefully modelled via just one independent variable.

I have not looked in detail at the transformations section, but that may become appropriate in the calculator.

If Lily does get involved, then it is clear that someone from AMI could do the resulting dialogue and (most of the) code.

Ogik99 commented 5 years ago

Could I go ahead with the implementation of the suggested dialogue?

rdstern commented 4 years ago

This is not urgent, but could be done alongside other tasks. It is another keyboard in the Models > Fit Model > Hypothesis Tests keyboard. It has groups of keys as follows: 1) Group name: Location, then keys oneway, wilcox, kruskal, normal, median, savage. Each key (for now) gives simply coin::oneway_test( ) etc. 2) Group name: Symmetry, then keys sign, wilcoksign, friedman, quade 3) Group name: Scale, then keys taha, klotz, mood, ansari, fligner, conover 4) Group name: Correlation, then keys spearman, fisyat, quadrant, koziol 5) Group name: Contingency, then keys chisq, cmh, lbl