Repository navigation
Feat/215/all stats for rxc - #216
Merged
Merged
Conversation
asizemore
marked this pull request as ready for review
March 23, 2023 12:10
d-callan
approved these changes
Mar 23, 2023
| object <- orderByReferenceValues(object) | ||
| setMethod("chiSqResults", signature("ContingencyTable"), function(object) { | ||
|
|
||
| # If we have reference values, reorder the data based on these values. |
Contributor
There was a problem hiding this comment.
Was this causing trouble? The reorder function should just be smart enough to handle this case
Member
Author
There was a problem hiding this comment.
it was a bit. Originally it looked like one thing but then i realized it was another. Anyways long story short, fixed in the newest commit!
d-callan
approved these changes
Mar 23, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #215
The only behavior change is that using
statistic = 'all'with an RxC table now will not err and will instead return chisq results. The results will be in the format of the 2x2 stats table.I could have gone a little further in the S4 class stuff, but i tried to keep the scope reasonable. For example, I'm leaving the the fishers exact test for later. I also got caught in a small rabbit hole with the
orderByReferenceValues(object)function. I wasn't sure how deep within the methods to split the TwoByTwo vs ContingencyTable (should they each have their own chisq fxn or should they have their own orderByReferenceValues or should orderByReferenceValues ignore ref vals if none given?).Another thing i did was i let situations where we have fewer than 2 vals continue to get handled by the 2x2 flow. In
mosaic.dtif no stat is set and we have fewer than 2 vals in the row and column, the stat gets set to 'all' which previously forced it through the 2x2 flow. Do we want to keep this behavior? Or should 2x2 be only 2x2 and the general contingency table handle the odd case of <2 x <2? I would guess the desired behavior is that the general contingency table handles that case?