Skip to content

Commit

Permalink
Merge branch 'master' of github.com:eigenfoo/tests-as-linear
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenfoo committed Jun 27, 2019
2 parents 71571ed + e39e4e0 commit c3f0890
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
5 changes: 4 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@ some ideas on how to contribute.
.
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE.txt
├── Makefile
├── README.md
├── cheatsheets
│   └── ...
├── index.html # Published HTML.
├── requirements-dev.txt # Dependencies for development.
├── requirements.txt # Dependencies.
├── scripts # Shell scripts for development, testing and deployment.
│   └── ...
├── tests-as-linear.ipynb # Main notebook.
└── tests_as_linear # Python source code
└── tests_as_linear # Supporting Python source code.
├── __init__.py
├── plots.py # Functions for large plots in main notebook.
└── utils.py # Utility functions used in main notebook.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ test: clean # Run test scripts.
check: clean lint test # Alias for `make clean lint test`.

black: # Format code in-place with black.
black *.py --target-version=py36
black tests_as_linear/ --target-version=py36

publish: # Run notebook in-place and generate HTML files.
jupyter nbconvert --to notebook --inplace --execute tests-as-linear.ipynb
Expand Down
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,11 @@ please refer to the [original appendices
upstream](https://github.com/lindeloev/tests-as-linear/tree/master/simulations)
for the simulations.

<div class="alert alert-warning">
Finally, certain statistical functions and tests are supported by neither
<code>statsmodels</code> or <code>scipy</code>, the two statistical Python
libraries used in this port. R code with no simple Python equivalent (mainly
in parts 6 and 7, <i>Three or more means</i> and <i>Proportions: Chi-square
is a log-linear model</i>) has not been ported. Such code has been noted in
yellow warning boxes such as this one.
</div>
Finally, certain statistical functions and tests are supported by neither
`statsmodels` or `scipy`, the two statistical Python libraries used in this
port. R code with no simple Python equivalent (mainly in sections 6 and 7,
"Three or more means" and "Proportions: Chi-square is a log-linear model") has
not been ported. Such code has been noted in yellow warning boxes.

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13298,10 +13298,10 @@ <h1 id="2-Python-environment">2 Python environment<a class="anchor-link" href="#
<span class="kn">import</span> <span class="nn">scipy</span>
<span class="kn">import</span> <span class="nn">statsmodels.api</span> <span class="k">as</span> <span class="nn">sm</span>
<span class="kn">import</span> <span class="nn">statsmodels.formula.api</span> <span class="k">as</span> <span class="nn">smf</span>
<span class="c1"># See GitHub repo for supporting Python code.</span>
<span class="kn">from</span> <span class="nn">tests_as_linear</span> <span class="k">import</span> <span class="n">plots</span><span class="p">,</span> <span class="n">utils</span>

<span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">seed</span><span class="p">(</span><span class="mi">1618</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">style</span><span class="o">.</span><span class="n">use</span><span class="p">(</span><span class="s1">&#39;seaborn-whitegrid&#39;</span><span class="p">)</span>
</pre></div>

</div>
Expand Down
4 changes: 2 additions & 2 deletions tests-as-linear.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@
"import scipy\n",
"import statsmodels.api as sm\n",
"import statsmodels.formula.api as smf\n",
"# See GitHub repo for supporting Python code.\n",
"from tests_as_linear import plots, utils\n",
"\n",
"np.random.seed(1618)\n",
"plt.style.use('seaborn-whitegrid')"
"np.random.seed(1618)"
]
},
{
Expand Down
2 changes: 2 additions & 0 deletions tests_as_linear/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import matplotlib.pyplot as plt
from .utils import signed_rank, format_decimals_factory

plt.style.use("seaborn-whitegrid")


def linear_regression_plot():
# Construct data as a pd.DataFrame
Expand Down

0 comments on commit c3f0890

Please sign in to comment.