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

Work with contingency tables #34

Open
5 tasks
mbcann01 opened this issue Oct 11, 2020 · 0 comments
Open
5 tasks

Work with contingency tables #34

mbcann01 opened this issue Oct 11, 2020 · 0 comments

Comments

@mbcann01
Copy link
Member

mbcann01 commented Oct 11, 2020

Overview

Need to come up with a way to work with 2x2 contingency tables.

Here's what I want to do:

  • Input a contingency table
  • Display the cases
  • Convert from raw data to data frame
  • Display contingency table as a data frame
  • Display the contingency table as a 2x2 table (matrix)

Helpful websites:

Thoughts

  • Enter cross tab as a freq_table.
  • Create functions for risks, odds, effect modification, etc.
  • Create a function that will allow freq_table to output in table format.
  • Create a function that will allow freq_table to output a data frame of observations/cases
  • Instead of row and column, consider using exposure and outcome.
  • Update vignettes

Other thoughts
freq_crosstab:

  • freqtable input
  • Manual frequency table inout
  • Data frame of observations input
  • Output is a table or matrix
  • From there, we can calculate quantities of interest (e.g. odds ratio). Broom style.
  • Also, need a display only version that can show n’s, row/column percents, etc.

Potential output style

..1 ..2 ..3 ..4
    Col var  
Row var Stats Outcome + Outcome -
Exposure + N    
Exposure + Percent    
Exposure - N    
Exposure - Percent    

Maybe even display as a flextable. Document that this layout is for viewing rather than analysis?
Maybe just use gmodels::CrossTable() instead of reinventing the wheel?

@mbcann01 mbcann01 added this to In progress in Bug fixes and enhancements Jun 1, 2021
@mbcann01 mbcann01 added this to In progress in Adding crosstab functionality Jun 1, 2021
@mbcann01 mbcann01 removed this from In progress in Bug fixes and enhancements Jun 1, 2021
@mbcann01 mbcann01 removed this from To do in Bug fixes and enhancements Jul 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Develop Next
Development

No branches or pull requests

1 participant