Comments (3)
Hi emmansh,
Indeed you can still use infer
if you're starting with a contingency table, but there are some caveats. Let me weigh in on your two limitations.
-
I think that depends on how you go about untabling. My inclination would be to try
pivot_longer()
thenuncount()
. I'm pretty sure they constitute reliable inverse operations to `table(). -
Uf, I think here you're running into a fundamental limitation of the way
infer
works right now. It's built so that it's data frame in, data frame out. That means that you'll need to process that table into a data frame before sending through an infer pipelines. It also means that the output of thegenerate()
function can be a very large data frame (it has the number of rows in the original data frame * reps). There are benefits to this approach - it allows for inspection of those data frames generated under the null - but there are costs in terms of performance. We had at one point discussed adding an option that would do the simulation through an efficient iteration process, bypassing the big data frame, but haven't done that yet (to my knowledge).
This might be a place where chisq.test()
makes more sense. It permits tabular inputs and defaults to using the asymptotic chi-square distribution of the test statistic, which should be a very good approximation if your counts are very large.
from infer.
Thanks for the issue, @emmansh! My responses would be the same as Andrew's. Will go ahead and close this issue, though feel free to holler if you feel your questions are unanswered and we can reopen.
from infer.
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
from infer.
Related Issues (20)
- Residuals and expected cell counts for chi-square tests HOT 7
- issues with p-value shading HOT 1
- Variance/SD hypotesis test HOT 2
- deprecated use of `...` in `dplyr::across()` HOT 1
- hyperlink help-files in error messages
- Grab other model attributes from `fit()` HOT 1
- `t_test` errors with variables with spaces in them HOT 2
- Upkeep for infer HOT 4
- `usethis::use_testthat(3)` and upgrade to 3e, testthat 3e vignette HOT 1
- ggplot 3.4.0 `size` aesthetic deprecation HOT 1
- vdiffr 1.0.0 `path` argument deprecation HOT 1
- `rep_slice_sample()` doesn't work with integer sampling weights HOT 6
- transition `*_glue()` machinery to cli HOT 1
- rep_col_shuffle()? HOT 3
- Permutation test for paired data HOT 12
- `specify()` not capable of tidyverse programming HOT 7
- prop_test() wrapper incorrectly computing the confidence interval for differences in percents. HOT 5
- Can I get expected values from contingency tables HOT 3
- Contrast matrices are not preserved HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from infer.