Skip to content

Commit

Permalink
add conditional simulations to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sampan501 committed Sep 12, 2024
1 parent 48a410d commit 46a6124
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
22 changes: 22 additions & 0 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,28 @@ Independence Simulations
rot_ksamp
gaussian_3samp

Conditional Independence Simulations
""""""""""""""""""""""""""""""""""""

.. autosummary::
:toctree: generated/

indep_normal
indep_lognormal
indep_binomial
cond_indep_normal
cond_indep_lognormal
cond_indep_normal_nonlinear
cond_indep_binomial
correlated_binomial
correlated_normal
correlated_normal_nonliear
correlated_lognormal
correlated_t_linear
correlated_t_quadratic
correlated_t_nonlinear
condi_indep_sim

Time-Series Simulations
""""""""""""""""""""""""

Expand Down
12 changes: 6 additions & 6 deletions tutorials/conditional.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@

import numpy as np
from hyppo.conditional import PartialDcorr
from hyppo.tools import linear
from hyppo.tools import correlated_normal
np.random.seed(123456789)
x, y = linear(100, 1)
stat, pvalue = PartialDcorr().test(x, y)
x, y, z = correlated_normal(100, 1)
stat, pvalue = PartialDcorr().test(x, y, z)
print("Statistic: ", stat)
print("p-value: ", pvalue)

Expand All @@ -147,9 +147,9 @@

import numpy as np
from hyppo.conditional import ConditionalDcorr
from hyppo.tools import linear
from hyppo.tools import correlated_normal
np.random.seed(123456789)
x, y = linear(100, 1)
stat, pvalue = ConditionalDcorr().test(x, y)
x, y, z = correlated_normal(100, 1)
stat, pvalue = ConditionalDcorr().test(x, y, z)
print("Statistic: ", stat)
print("p-value: ", pvalue)

0 comments on commit 46a6124

Please sign in to comment.