Skip to content

Commit

Permalink
doc(fisher test): basic docs
Browse files Browse the repository at this point in the history
  • Loading branch information
YeungOnion committed Jul 19, 2024
1 parent c469335 commit f57aab5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/stats_tests/fisher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ fn binary_search(

/// Perform a Fisher exact test on a 2x2 contingency table.
/// Based on scipy's fisher test: https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.fisher_exact.html#scipy-stats-fisher-exact
/// Returns the odds ratio and p_value
/// Expects a table in row-major order
/// Returns the [odds ratio](https://en.wikipedia.org/wiki/Odds_ratio) and p_value
/// # Examples
///
/// ```
Expand Down Expand Up @@ -132,6 +133,7 @@ pub fn fishers_exact_with_odds_ratio(

/// Perform a Fisher exact test on a 2x2 contingency table.
/// Based on scipy's fisher test: https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.fisher_exact.html#scipy-stats-fisher-exact
/// Expects a table in row-major order
/// Returns only the p_value
/// # Examples
///
Expand Down
7 changes: 7 additions & 0 deletions src/stats_tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
pub mod fisher;

/// Specifies an [alternative hypothesis](https://en.wikipedia.org/wiki/Alternative_hypothesis)
#[derive(Debug, Copy, Clone)]
pub enum Alternative {
#[doc(alias = "two-tailed")]
#[doc(alias = "two tailed")]
TwoSided,
#[doc(alias = "one-tailed")]
#[doc(alias = "one tailed")]
Less,
#[doc(alias = "one-tailed")]
#[doc(alias = "one tailed")]
Greater,
}

Expand Down

0 comments on commit f57aab5

Please sign in to comment.