What R packages are there to do statistical tests in a tidyverse compatible way?

I have seen the infer package, which looks great for using computational approaches to statistics.

Are there any R tidyverse compatible package(s) out there that can help do statistical tests using conventional mathematical approximation techniques?

What do you mean 'tidyverse compatible way'...?

I don't think I've ever found something that is not tidyverse compatible. Some are more compatible than others...

What test do you wish to do? Don't be driven by tidy Vs base. Be driven by the test... Then someone can guide you how to apply the test in a tidy way. But start with using the right test. When you come to publish, saying "we chose Test X because it was compatible with tidy" is a terrible way to write the test selection

1 Like

Hmm, so some things that I'm looking for:
-Works with data.frames or tibbles (i.e. not vectors, matrixes or tables)
-Has arguments that similar/consistent in style
-Has consistent arguments across tests
-Works with the pipe
-Follow the tidyverse style guide

I get all that but which test?

Much - perhaps all of base R works with tidyverse. So instead of saying which tests work with tidy, you should be saying I want to do a (insert name of test) - can I do this in a tidy way?

But also, consider that the output of most tests is not a single value. How do you want the output?

1 Like

:fu: This! Also, the broom package has helpers for getting the output/information about models from a wide array of packages into "tidy" format, if that's what you're looking to do:

You might also take a look at the various tidymodels packages.
But, as @CALUM_POLWART mentioned, the answer to your question really depends on what it is that you're trying to do.

1 Like

Thanks @CALUM_POLWART and @mara broom and infer from tidymodels partially address what I'm looking for.

Agree anything can be made to work with tidyverse. But I just find the lack of consistency in particular really annoying to work with. This is remembering which package each different test is in, how each function works as they all request different inconsistent inputs and arguments etc.

These have been motivating factors for many tidyverse packages, so I just wondered if a package had been made to address this somewhere else that I was not aware of. But it seems not

I think that's basically the raison d'être for parsnip (part of tidymodels)—to make a consistent interface for different packages and engines. I'm on my phone right now, but take a look at the tidymodels site and intro to the book, I think it might be what you're looking for.

See the intro to parsnip here:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.