Skip to content

Commit

Permalink
Update anova_documentation.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
Corey-Bryant committed Dec 26, 2021
1 parent b57e839 commit 5324e3a
Showing 1 changed file with 39 additions and 16 deletions.
55 changes: 39 additions & 16 deletions source/anova_documentation.rst
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
*******
*************
anova()
*******
*************

Description
===========
Performs the analysis-of-variance (ANOVA) and analysis-of-covariance (ANCOVA).



Parameters
==========



Arguments
---------

Input
-----
**anova(self, formula_like, data = {}, sum_of_squares = 3, conf_level = 0.95)**

* **formula_like** : A valid formula which will parse the data into a design matrix.
* **data** : The dataframe which contains the data to be analyzed.
* **sum_of_squares** : The type of sum of squares which is desired, the default it Type 3.
* **sum_of_squares** : The type of sum of squares which is desired, the default is Type 3.
* **conf_level** : The confidence interval desired.


Returned
--------
* A data object with class "anova". This object has accessible methods.
Returns
-------
Returns an object with class "anova"; this object has accessible methods which are
described below.

anova methods
^^^^^^^^^^^^^

* **results(return_type = "Dataframe", decimals = 4, pretty_format = True)**
* **return_type** : The type of data structre the results should be returned as. Supported options
* **return_type** : The type of data structure the results should be returned as. Supported options
are 'Dataframe' which will return a Pandas DataFrame or 'Dictionary' which will return a dictionary.
* **decimals** : The number of decimal places the data should be rounded too.
* **pretty_format ** : If pretty formatting should be applied. This adds extra empty spaces in the returned data
Expand All @@ -37,18 +39,39 @@ anova methods


Examples
--------
First to load required libraries,
========
First to load required libraries for this example. Below, an example data set will be loaded
in using statsmodels.datasets; the data loaded in is a data set available through Stata
called 'systolic'.

.. code:: python
import pandas
import researchpy as rp
# Used to load example data #
import statsmodels.datasets
import researchpy as rp
systolic = statsmodels.datasets.webuse('systolic')
Now let's take a quick view of the data set.

.. code:: python
systolic.info()
.. parsed-literal::
drug disease systolic
0 1 1 42
1 1 1 44
2 1 1 36
3 1 1 13
4 1 1 19
Now to take a look at the descriptives of the univariate data.

.. code:: python
Expand Down

0 comments on commit 5324e3a

Please sign in to comment.