April 2019
Intermediate to advanced
426 pages
11h 13m
English
Many Python packages, such as SciPy, come with several variants of regression functions. In particular, the statsmodels package is a complement to SciPy with descriptive statistics and the estimation of statistical models. The official page for Statsmodels is https://www.statsmodels.org.
If Statsmodels is not yet installed in your Python environment, run the following command to do so:
$ pip install -U statsmodels
In this example, we will use the ols function of the statsmodels module to perform an ordinary least-squares regression and view its summary.