# Hmisc::summaryM()

**URL:** <https://discourse.datamethods.org/t/hmisc-summarym/22166>\
**Category:** formal\
**Tags:** nonparametric\
**Created:** [October 27, 2024, 9:49pm UTC](https://discourse.datamethods.org/t/hmisc-summarym/22166 "2024-10-27T21:49:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![stsang](https://discourse.datamethods.org/user_avatar/discourse.datamethods.org/stsang/32/2104_2.png) [@stsang](https://discourse.datamethods.org/u/stsang)\
**Post date:** [October 27, 2024, 9:49pm UTC](https://discourse.datamethods.org/t/hmisc-summarym/22166/1 "2024-10-27T21:49:40Z")

</div>

I used the function to test a variable (with two categories). The statistics column states that it is F1 with df (1,number of observations-2). I initially thought that it was a mistake. Then the footnote say that the test is Wilcox Test. I know that it is a Chi-Square based test and it sound right that one of the degree of freedom is 1. I do not know how to convince others and do the conversion.

Many thanks for your suggestions.

Best wishes

Sandro

---

<div class="post-metadata">

**Author:** ![f2harrell](https://discourse.datamethods.org/user_avatar/discourse.datamethods.org/f2harrell/32/165_2.png) [@f2harrell](https://discourse.datamethods.org/u/f2harrell)\
**Post date:** [October 27, 2024, 11:03pm UTC](https://discourse.datamethods.org/t/hmisc-summarym/22166/2 "2024-10-27T23:03:38Z")

</div>

The F distribution is a little more accurate that the \chi^2 distribution for Wilcoxon and Spearman tests. That’s why I used F there.

---

<div class="post-metadata">

**Author:** ![stsang](https://discourse.datamethods.org/user_avatar/discourse.datamethods.org/stsang/32/2104_2.png) [@stsang](https://discourse.datamethods.org/u/stsang)\
**Post date:** [October 30, 2024, 4:37pm UTC](https://discourse.datamethods.org/t/hmisc-summarym/22166/3 "2024-10-30T16:37:43Z")

</div>

Dear Professor Harrell

Thank you very much for your help.

I know that what you have done is supreme. However, for many medical researchers, it is hard to convince them. Any possibly I can cusotmise the conTest function. If I know this, it will be helpful for future work too. I followed the instruction of the vignette. I go no success. I do not believe that it is something difficult. You make everything very user-friendly.

Thank you very much for you advice.

Best regards

Sandro

---

<div class="post-metadata">

**Author:** ![f2harrell](https://discourse.datamethods.org/user_avatar/discourse.datamethods.org/f2harrell/32/165_2.png) [@f2harrell](https://discourse.datamethods.org/u/f2harrell)\
**Post date:** [October 30, 2024, 7:12pm UTC](https://discourse.datamethods.org/t/hmisc-summarym/22166/4 "2024-10-30T19:12:01Z")

</div>

You can specify your own `test` function to `summaryM` but I don’t understand why you would use a less accurate \chi^2 p-value approximation. I’ve never had to convince any colleagues of this.

---

<div class="post-metadata">

**Author:** ![stsang](https://discourse.datamethods.org/user_avatar/discourse.datamethods.org/stsang/32/2104_2.png) [@stsang](https://discourse.datamethods.org/u/stsang)\
**Post date:** [November 5, 2024, 7:41pm UTC](https://discourse.datamethods.org/t/hmisc-summarym/22166/5 "2024-11-05T19:41:07Z")

</div>

Dear Professor Harrell

Thank you very much for your advice.

I like precision. Unfortunately, people are inertia. They get used to doing thing in certain ways and they do not like to adapt to alternative idea. They are used to see W statistics…

Best wishes

Sandro
