Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

htest support #43

Closed
DominiqueMakowski opened this issue Feb 16, 2019 · 5 comments
Closed

htest support #43

DominiqueMakowski opened this issue Feb 16, 2019 · 5 comments
Labels
Enhancement 💥 Implemented features can be improved or revised Help us 👀 Extra attention is needed Low priority 😴 This issue can be easily workaround or happens only in edge cases

Comments

@DominiqueMakowski
Copy link
Member

This is a follow up to discuss the htest case.

@strengejacke
Copy link
Member

Copied from PR:

See here: we have no information on parameter names:

str(t.test(extra ~ group, data = sleep))
#> List of 9
#>  $ statistic  : Named num -1.86
#>   ..- attr(*, "names")= chr "t"
#>  $ parameter  : Named num 17.8
#>   ..- attr(*, "names")= chr "df"
#>  $ p.value    : num 0.0794
#>  $ conf.int   : num [1:2] -3.365 0.205
#>   ..- attr(*, "conf.level")= num 0.95
#>  $ estimate   : Named num [1:2] 0.75 2.33
#>   ..- attr(*, "names")= chr [1:2] "mean in group 1" "mean in group 2"
#>  $ null.value : Named num 0
#>   ..- attr(*, "names")= chr "difference in means"
#>  $ alternative: chr "two.sided"
#>  $ method     : chr "Welch Two Sample t-test"
#>  $ data.name  : chr "extra by group"
#>  - attr(*, "class")= chr "htest"

Here, we only have a reference to variable names in a single character string, difficult to extract properly:

library(sjmisc)
data(efc)
str(t.test(efc$c12hour, efc$neg_c_7, data = sleep))
#> List of 9
#>  $ statistic  : Named num 18
#>   ..- attr(*, "names")= chr "t"
#>  $ parameter  : Named num 912
#>   ..- attr(*, "names")= chr "df"
#>  $ p.value    : num 2.98e-62
#>  $ conf.int   : num [1:2] 27.2 33.9
#>   ..- attr(*, "conf.level")= num 0.95
#>  $ estimate   : Named num [1:2] 42.4 11.8
#>   ..- attr(*, "names")= chr [1:2] "mean of x" "mean of y"
#>  $ null.value : Named num 0
#>   ..- attr(*, "names")= chr "difference in means"
#>  $ alternative: chr "two.sided"
#>  $ method     : chr "Welch Two Sample t-test"
#>  $ data.name  : chr "efc$c12hour and efc$neg_c_7"
#>  - attr(*, "class")= chr "htest"

@DominiqueMakowski
Copy link
Member Author

maybe we can move it to 0.3.0 as it is not urgent?

@strengejacke
Copy link
Member

Yes, I have little time the next days to work on packages, so I would focus on polishing docs and testing, in order to get a stable and nice release 0.2.0...

The htest-class is really horrible in terms of tidying.

@strengejacke strengejacke added this to the 0.3 milestone Mar 20, 2019
@strengejacke strengejacke added Enhancement 💥 Implemented features can be improved or revised Help us 👀 Extra attention is needed labels Jun 5, 2019
@strengejacke strengejacke added the Low priority 😴 This issue can be easily workaround or happens only in edge cases label Feb 16, 2020
@strengejacke strengejacke removed this from the 0.3 milestone Aug 13, 2020
@IndrajeetPatil
Copy link
Member

Looks like we have added an extensive support for most of the htest and pairwise.htest objects.

I feel like only stats::oneway.test is currently not supported, which is the one I use in my packages 😅

Can we please support it? I won't need to use broom::tidy for any of the htest objects then.

@strengejacke
Copy link
Member

Do we need oneway.test here, or in parameters? There isn't probably much to extract for insight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement 💥 Implemented features can be improved or revised Help us 👀 Extra attention is needed Low priority 😴 This issue can be easily workaround or happens only in edge cases
Projects
None yet
Development

No branches or pull requests

3 participants