diff --git a/.travis.yml b/.travis.yml index 20690c1d24c..88cecc8e157 100644 --- a/.travis.yml +++ b/.travis.yml @@ -94,7 +94,7 @@ notifications: # Setup anaconda before_install: - - wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh + - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh - chmod +x miniconda.sh - ./miniconda.sh -b -p /home/travis/miniconda - export PATH=/home/travis/miniconda/bin:$PATH diff --git a/CHANGES.md b/CHANGES.md index 073458c05ff..7b103935195 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,4 @@ Release Notes ============= -The list of changes for each statsmodels release can be found [here](http://www.statsmodels.org/devel/release/index.html). Full details are available in the [commit logs](https://github.com/statsmodels/statsmodels). +The list of changes for each statsmodels release can be found [here](https://www.statsmodels.org/devel/release/index.html). Full details are available in the [commit logs](https://github.com/statsmodels/statsmodels). diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 6afe83c8b60..ee48da40f0a 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -20,8 +20,8 @@ Making Changes to the Code For a pull request to be accepted, you must meet the below requirements. This greatly helps in keeping the job of maintaining and releasing the software a shared effort. - **One branch. One feature.** Branches are cheap and github makes it easy to merge and delete branches with a few clicks. Avoid the temptation to lump in a bunch of unrelated changes when working on a feature, if possible. This helps us keep track of what has changed when preparing a release. -- Commit messages should be clear and concise. This means a subject line of less than 80 characters, and, if necessary, a blank line followed by a commit message body. We have an `informal commit format standard `_ that we try to adhere to. You can see what this looks like in practice by ``git log --oneline -n 10``. If your commit references or closes a specific issue, you can close it by mentioning it in the `commit message `_. (*For maintainers*: These suggestions go for Merge commit comments too. These are partially the record for release notes.) -- Code submissions must always include tests. See our `notes on testing `_. +- Commit messages should be clear and concise. This means a subject line of less than 80 characters, and, if necessary, a blank line followed by a commit message body. We have an `informal commit format standard `_ that we try to adhere to. You can see what this looks like in practice by ``git log --oneline -n 10``. If your commit references or closes a specific issue, you can close it by mentioning it in the `commit message `_. (*For maintainers*: These suggestions go for Merge commit comments too. These are partially the record for release notes.) +- Code submissions must always include tests. See our `notes on testing `_. - Each function, class, method, and attribute needs to be documented using docstrings. We conform to the `numpy docstring standard `_. - If you are adding new functionality, you need to add it to the documentation by editing (or creating) the appropriate file in ``docs/source``. - Make sure your documentation changes parse correctly. Change into the top-level ``docs/`` directory and type:: @@ -41,7 +41,7 @@ So you want to submit a patch to `statsmodels` but aren't too familiar with gith 2. `Create a new feature branch `_. Each branch must be self-contained, with a single new feature or bugfix. 3. Make sure the test suite passes. This includes testing on Python 3. The easiest way to do this is to either enable `Travis-CI `_ on your fork, or to make a pull request and check there. 4. Document your changes by editing the appropriate file in ``docs/source/``. If it is a big, new feature add a note and an example to the latest ``docs/source/release/versionX.X.rst`` file. See older versions for examples. If it's a minor change, it will be included automatically in our relase notes. -5. Add an example. If it is a big, new feature please submit an example notebook by following `these instructions `_. +5. Add an example. If it is a big, new feature please submit an example notebook by following `these instructions `_. 6. `Submit a pull request `_ Mailing List @@ -52,7 +52,7 @@ Conversations about development take place on the `statsmodels mailing list `_ +The ``statsmodels`` documentation's `developer page `_ offers much more detailed information about the process. License diff --git a/INSTALL.txt b/INSTALL.txt index 0507b3a44ce..f0b0b368267 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -111,7 +111,7 @@ You will need a C compiler installed. Installing from Source on Windows --------------------------------- -See http://www.statsmodels.org/devel/install.html#windows. +See https://www.statsmodels.org/devel/install.html#windows. Documentation @@ -120,4 +120,4 @@ Documentation You may find more information about the project and installation in our documentation -http://www.statsmodels.org/devel/install.html +https://www.statsmodels.org/devel/install.html diff --git a/README.rst b/README.rst index d0cc7918db6..77b96b884d9 100644 --- a/README.rst +++ b/README.rst @@ -13,18 +13,18 @@ Documentation The documentation for the latest release is at -http://www.statsmodels.org/stable/ +https://www.statsmodels.org/stable/ The documentation for the development version is at -http://www.statsmodels.org/dev/ +https://www.statsmodels.org/dev/ Recent improvements are highlighted in the release notes -http://www.statsmodels.org/stable/release/version0.9.html +https://www.statsmodels.org/stable/release/version0.9.html -Backups of documentation are available at http://statsmodels.github.io/stable/ -and http://statsmodels.github.io/dev/. +Backups of documentation are available at https://statsmodels.github.io/stable/ +and https://statsmodels.github.io/dev/. @@ -125,7 +125,7 @@ https://github.com/statsmodels/statsmodels/tags Binaries and source distributions are available from PyPi -http://pypi.python.org/pypi/statsmodels/ +https://pypi.org/project/statsmodels/ Binaries can be installed in Anaconda @@ -137,7 +137,7 @@ Installing from sources See INSTALL.txt for requirements or see the documentation -http://statsmodels.github.io/dev/install.html +https://statsmodels.github.io/dev/install.html License ======= diff --git a/docs/source/about.rst b/docs/source/about.rst index f62e881151b..21327af2449 100644 --- a/docs/source/about.rst +++ b/docs/source/about.rst @@ -57,7 +57,7 @@ development of statsmodels: We would also like to thank our hosting providers, `github `_ for the public code repository, `github.io -`_ for hosting our documentation and `python.org +`_ for hosting our documentation and `python.org `_ for making our downloads available on PyPi. We also thank our continuous integration providers, diff --git a/docs/source/conf.py b/docs/source/conf.py index a9534814203..4413da15525 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -301,12 +301,12 @@ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { - 'numpy' : ('https://docs.scipy.org/doc/numpy/', None), - 'python' : ('https://docs.python.org/3.2', None), - 'pydagogue' : ('http://matthew-brett.github.io/pydagogue/', None), - 'patsy' : ('http://patsy.readthedocs.io/en/latest/', None), - 'pandas' : ('http://pandas.pydata.org/pandas-docs/stable/', None), - } + 'numpy': ('https://docs.scipy.org/doc/numpy/', None), + 'python': ('https://docs.python.org/3/', None), + 'pydagogue': ('https://matthew-brett.github.io/pydagogue/', None), + 'patsy': ('https://patsy.readthedocs.io/en/latest/', None), + 'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None), +} from os.path import dirname, abspath, join plot_basedir = join(dirname(dirname(os.path.abspath(__file__))), 'source') diff --git a/docs/source/datasets/index.rst b/docs/source/datasets/index.rst index 857bd405ff5..73a1d9adf58 100644 --- a/docs/source/datasets/index.rst +++ b/docs/source/datasets/index.rst @@ -25,7 +25,7 @@ Using Datasets from Stata Using Datasets from R --------------------- -The `Rdatasets project `__ gives access to the datasets available in R's core datasets package and many other common R packages. All of these datasets are available to statsmodels by using the :func:`get_rdataset` function. The actual data is accessible by the ``data`` attribute. For example: +The `Rdatasets project `__ gives access to the datasets available in R's core datasets package and many other common R packages. All of these datasets are available to statsmodels by using the :func:`get_rdataset` function. The actual data is accessible by the ``data`` attribute. For example: .. ipython:: python diff --git a/docs/source/dev/examples.rst b/docs/source/dev/examples.rst index 3237c8c3a50..4580178c3d0 100644 --- a/docs/source/dev/examples.rst +++ b/docs/source/dev/examples.rst @@ -26,7 +26,7 @@ Examples are best contributed as IPython notebooks. Save your notebook with all The Example Gallery ~~~~~~~~~~~~~~~~~~~ -We have a gallery of example notebooks available `here `_. If you would like your example to show up in this gallery, add a link to the notebook in ``docs/source/examples/landing.json``. For the thumbnail, take a screenshot of what you think is the best "hook" for the notebook. The image will be displayed at 360 x 225 (W x H). It's best to save the image as a PNG with a resolution that is some multiple of 360 x 225 (720 x 450 is preferred). +We have a gallery of example notebooks available `here `_. If you would like your example to show up in this gallery, add a link to the notebook in ``docs/source/examples/landing.json``. For the thumbnail, take a screenshot of what you think is the best "hook" for the notebook. The image will be displayed at 360 x 225 (W x H). It's best to save the image as a PNG with a resolution that is some multiple of 360 x 225 (720 x 450 is preferred). Before submitting a PR diff --git a/docs/source/dev/index.rst b/docs/source/dev/index.rst index fdfa81f3902..8a43125a026 100644 --- a/docs/source/dev/index.rst +++ b/docs/source/dev/index.rst @@ -21,7 +21,7 @@ Making Changes to the Code For a pull request to be accepted, you must meet the below requirements. This greatly helps the job of maintaining and releasing the software a shared effort. - **One branch. One feature.** Branches are cheap and github makes it easy to merge and delete branches with a few clicks. Avoid the temptation to lump in a bunch of unrelated changes when working on a feature, if possible. This helps us keep track of what has changed when preparing a release. -- Commit messages should be clear and concise. This means a subject line of less than 80 characters, and, if necessary, a blank line followed by a commit message body. We have an `informal commit format standard `_ that we try to adhere to. You can see what this looks like in practice by ``git log --oneline -n 10``. If your commit references or closes a specific issue, you can close it by mentioning it in the `commit message `_. (*For maintainers*: These suggestions go for Merge commit comments too. These are partially the record for release notes.) +- Commit messages should be clear and concise. This means a subject line of less than 80 characters, and, if necessary, a blank line followed by a commit message body. We have an `informal commit format standard `_ that we try to adhere to. You can see what this looks like in practice by ``git log --oneline -n 10``. If your commit references or closes a specific issue, you can close it by mentioning it in the `commit message `_. (*For maintainers*: These suggestions go for Merge commit comments too. These are partially the record for release notes.) - Code submissions must always include tests. See our notes on :ref:`testing`. - Each function, class, method, and attribute needs to be documented using docstrings. We conform to the `numpy docstring standard `_. - If you are adding new functionality, you need to add it to the documentation by editing (or creating) the appropriate file in ``docs/source``. diff --git a/docs/source/dev/maintainer_notes.rst b/docs/source/dev/maintainer_notes.rst index 7f3c25383ce..d95eb9bc9a1 100644 --- a/docs/source/dev/maintainer_notes.rst +++ b/docs/source/dev/maintainer_notes.rst @@ -189,4 +189,4 @@ Prefix commit messages in the master branch of the main shared repository with t .. vbench .. ------ .. -.. See :ref:`vbenchdoc` notes for working with the `statsmodels vbench suite `_. The github repository is available `here `_. +.. See :ref:`vbenchdoc` notes for working with the `statsmodels vbench suite `_. The github repository is available `here `_. diff --git a/docs/source/faq.rst b/docs/source/faq.rst index edd03d65865..72908623d10 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -22,7 +22,7 @@ How does statsmodels handle missing data? Missing data can be handled via the ``missing`` keyword argument. Every model takes this keyword. You can find more information in the docstring of :class:`statsmodels.base.Model `. -.. `Model class `_. +.. `Model class `_. .. _build-faq: diff --git a/docs/source/gettingstarted.rst b/docs/source/gettingstarted.rst index 83ff4d6671f..eb70f315d12 100644 --- a/docs/source/gettingstarted.rst +++ b/docs/source/gettingstarted.rst @@ -34,11 +34,11 @@ Data ---- We download the `Guerry dataset -`_, a +`_, a collection of historical data used in support of Andre-Michel Guerry's 1833 *Essay on the Moral Statistics of France*. The data set is hosted online in comma-separated values format (CSV) by the `Rdatasets -`_ repository. +`_ repository. We could download the file locally and then load it using ``read_csv``, but ``pandas`` takes care of all of this automatically for us: diff --git a/docs/source/index.rst b/docs/source/index.rst index 32552d022a6..cc998f23378 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -8,7 +8,7 @@ of many different statistical models, as well as for conducting statistical test data exploration. An extensive list of result statistics are available for each estimator. The results are tested against existing statistical packages to ensure that they are correct. The package is released under the open source Modified BSD (3-clause) license. -The online documentation is hosted at `statsmodels.org `__. +The online documentation is hosted at `statsmodels.org `__. Minimal Examples diff --git a/docs/source/release/version0.5.rst b/docs/source/release/version0.5.rst index 19a364cb0c4..a8cb23a1298 100644 --- a/docs/source/release/version0.5.rst +++ b/docs/source/release/version0.5.rst @@ -26,7 +26,7 @@ Alternatively, each model in the usual ``statsmodels.api`` namespace has a ``fro import pandas as pd import statsmodels.formula.api as smf - url = 'http://vincentarelbundock.github.io/Rdatasets/csv/HistData/Guerry.csv' + url = 'https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/csv/HistData/Guerry.csv' data = pd.read_csv(url) # Fit regression model (using the natural log of one of the regressors) @@ -108,7 +108,7 @@ The power module (``statsmodel.stats.power``) currently implements power and sam Other important new features ---------------------------- -* **IPython notebook examples**: Many of our examples have been converted or added as IPython notebooks now. They are available `here `_. +* **IPython notebook examples**: Many of our examples have been converted or added as IPython notebooks now. They are available `here `_. * **Improved marginal effects for discrete choice models**: Expanded options for obtaining marginal effects after the estimation of nonlinear discrete choice models are available. See :py:meth:`get_margeff `. @@ -116,7 +116,7 @@ Other important new features * **New datasets**: New :ref:`datasets ` are available for examples. -* **Access to R datasets**: We now have access to many of the same datasets available to R users through the `Rdatasets project `_. You can access these using the :func:`sm.datasets.get_rdataset ` function. This function also includes caching of these datasets. +* **Access to R datasets**: We now have access to many of the same datasets available to R users through the `Rdatasets project `_. You can access these using the :func:`sm.datasets.get_rdataset ` function. This function also includes caching of these datasets. * **Improved numerical differentiation tools**: Numerical differentiation routines have been greatly improved and expanded to cover all the routines discussed in:: diff --git a/docs/source/release/version0.8.rst b/docs/source/release/version0.8.rst index 2d8550a5e76..5bbf535ee4a 100644 --- a/docs/source/release/version0.8.rst +++ b/docs/source/release/version0.8.rst @@ -19,8 +19,8 @@ recent numpy and pandas releases. Statsmodels is using now github to store the updated documentation which is available under -http://www.statsmodels.org/stable for the last release, and -http://www.statsmodels.org/devel/ for the development version. +https://www.statsmodels.org/stable for the last release, and +https://www.statsmodels.org/devel/ for the development version. This is the last release that supports Python 2.6. diff --git a/docs/source/release/version0.9.rst b/docs/source/release/version0.9.rst index 4b084b7da1f..82e09f1631e 100644 --- a/docs/source/release/version0.9.rst +++ b/docs/source/release/version0.9.rst @@ -12,8 +12,8 @@ Release summary Statsmodels is using github to store the updated documentation which is available under -http://www.statsmodels.org/stable for the last release, and -http://www.statsmodels.org/devel/ for the development version. +https://www.statsmodels.org/stable for the last release, and +https://www.statsmodels.org/devel/ for the development version. **Warning** diff --git a/docs/themes/statsmodels/indexsidebar.html b/docs/themes/statsmodels/indexsidebar.html index d8c8f8919fd..86372e1ac38 100644 --- a/docs/themes/statsmodels/indexsidebar.html +++ b/docs/themes/statsmodels/indexsidebar.html @@ -3,7 +3,7 @@

Download

{% if 'dev' in version %}

This documentation is for version {{ version }}, which is not -released yet. Grab the source code from Github to install this version. You can go to the documentation for the last release here.

+released yet. Grab the source code from Github to install this version. You can go to the documentation for the last release here.

{% else %} @@ -14,7 +14,7 @@

Download

or conda:
conda install statsmodels
-Documentation for the current development version is here.

+Documentation for the current development version is here.

{% endif %} diff --git a/examples/notebooks/chi2_fitting.ipynb b/examples/notebooks/chi2_fitting.ipynb index 393ff01b1db..891f792452a 100644 --- a/examples/notebooks/chi2_fitting.ipynb +++ b/examples/notebooks/chi2_fitting.ipynb @@ -98,7 +98,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "To fit a straight line use the weighted least squares class [WLS](http://www.statsmodels.org/devel/generated/statsmodels.regression.linear_model.WLS.html) ... the parameters are called:\n", + "To fit a straight line use the weighted least squares class [WLS](https://www.statsmodels.org/devel/generated/statsmodels.regression.linear_model.WLS.html) ... the parameters are called:\n", "* `exog` = `sm.add_constant(x)`\n", "* `endog` = `y`\n", "* `weights` = `1 / sqrt(y_err)`\n", diff --git a/examples/notebooks/generic_mle.ipynb b/examples/notebooks/generic_mle.ipynb index 9f49cb3d580..47b2ebcae34 100644 --- a/examples/notebooks/generic_mle.ipynb +++ b/examples/notebooks/generic_mle.ipynb @@ -288,8 +288,8 @@ "\n", "### Usage Example\n", "\n", - "The [Medpar](http://vincentarelbundock.github.com/Rdatasets/doc/COUNT/medpar.html)\n", - "dataset is hosted in CSV format at the [Rdatasets repository](http://vincentarelbundock.github.com/Rdatasets). We use the ``read_csv``\n", + "The [Medpar](https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/doc/COUNT/medpar.html)\n", + "dataset is hosted in CSV format at the [Rdatasets repository](https://raw.githubusercontent.com/vincentarelbundock/Rdatasets). We use the ``read_csv``\n", "function from the [Pandas library](http://pandas.pydata.org) to load the data\n", "in memory. We then print the first few columns: \n" ] @@ -456,7 +456,7 @@ "source": [ "Or we could compare them to results obtained using the MASS implementation for R:\n", "\n", - " url = 'http://vincentarelbundock.github.com/Rdatasets/csv/COUNT/medpar.csv'\n", + " url = 'https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/csv/COUNT/medpar.csv'\n", " medpar = read.csv(url)\n", " f = los~factor(type)+hmo+white\n", " \n", diff --git a/examples/notebooks/markov_autoregression.ipynb b/examples/notebooks/markov_autoregression.ipynb index 75fe7173e12..8fa5d8965b4 100644 --- a/examples/notebooks/markov_autoregression.ipynb +++ b/examples/notebooks/markov_autoregression.ipynb @@ -72,7 +72,7 @@ "outputs": [], "source": [ "# Get the RGNP data to replicate Hamilton\n", - "dta = pd.read_stata('http://www.stata-press.com/data/r14/rgnp.dta').iloc[1:]\n", + "dta = pd.read_stata('https://www.stata-press.com/data/r14/rgnp.dta').iloc[1:]\n", "dta.index = pd.DatetimeIndex(dta.date, freq='QS')\n", "dta_hamilton = dta.rgnp\n", "\n", diff --git a/examples/notebooks/markov_regression.ipynb b/examples/notebooks/markov_regression.ipynb index e0b113a1113..13577834540 100644 --- a/examples/notebooks/markov_regression.ipynb +++ b/examples/notebooks/markov_regression.ipynb @@ -56,7 +56,7 @@ "\n", "We will estimate the parameters of this model by maximum likelihood: $p_{00}, p_{10}, \\mu_0, \\mu_1, \\sigma^2$.\n", "\n", - "The data used in this example can be found at http://www.stata-press.com/data/r14/usmacro." + "The data used in this example can be found at https://www.stata-press.com/data/r14/usmacro." ] }, { @@ -330,7 +330,7 @@ "\n", "We use maximum likelihood to estimate the parameters of this model: $p_{00}, p_{10}, \\mu_0, \\mu_1, \\beta_0, \\beta_1, \\sigma_0^2, \\sigma_1^2$.\n", "\n", - "The application is to absolute returns on stocks, where the data can be found at http://www.stata-press.com/data/r14/snp500." + "The application is to absolute returns on stocks, where the data can be found at https://www.stata-press.com/data/r14/snp500." ] }, { diff --git a/examples/notebooks/regression_diagnostics.ipynb b/examples/notebooks/regression_diagnostics.ipynb index b90ea645b65..25b0598ac21 100644 --- a/examples/notebooks/regression_diagnostics.ipynb +++ b/examples/notebooks/regression_diagnostics.ipynb @@ -11,7 +11,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "This example file shows how to use a few of the ``statsmodels`` regression diagnostic tests in a real-life context. You can learn about more tests and find out more information abou the tests here on the [Regression Diagnostics page.](http://www.statsmodels.org/stable/diagnostic.html) \n", + "This example file shows how to use a few of the ``statsmodels`` regression diagnostic tests in a real-life context. You can learn about more tests and find out more information abou the tests here on the [Regression Diagnostics page.](https://www.statsmodels.org/stable/diagnostic.html) \n", "\n", "Note that most of the tests described here only return a tuple of numbers, without any annotation. A full description of outputs is always included in the docstring and in the online ``statsmodels`` documentation. For presentation purposes, we use the ``zip(name,test)`` construct to pretty-print short descriptions in the examples below." ] @@ -43,7 +43,7 @@ "import matplotlib.pyplot as plt\n", "\n", "# Load data\n", - "url = 'http://vincentarelbundock.github.io/Rdatasets/csv/HistData/Guerry.csv'\n", + "url = 'https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/csv/HistData/Guerry.csv'\n", "dat = pd.read_csv(url)\n", "\n", "# Fit regression model (using the natural log of one of the regressors)\n", @@ -148,7 +148,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Other plotting options can be found on the [Graphics page.](http://www.statsmodels.org/stable/graphics.html)" + "Other plotting options can be found on the [Graphics page.](https://www.statsmodels.org/stable/graphics.html)" ] }, { diff --git a/examples/notebooks/regression_plots.ipynb b/examples/notebooks/regression_plots.ipynb index 30e0ec8d92c..368b97e3b1a 100644 --- a/examples/notebooks/regression_plots.ipynb +++ b/examples/notebooks/regression_plots.ipynb @@ -42,7 +42,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We can use a utility function to load any R dataset available from the great Rdatasets package." + "We can use a utility function to load any R dataset available from the great Rdatasets package." ] }, { diff --git a/examples/notebooks/statespace_sarimax_stata.ipynb b/examples/notebooks/statespace_sarimax_stata.ipynb index 9de651fd92a..3c49eb3cb81 100644 --- a/examples/notebooks/statespace_sarimax_stata.ipynb +++ b/examples/notebooks/statespace_sarimax_stata.ipynb @@ -103,7 +103,7 @@ "outputs": [], "source": [ "# Dataset\n", - "wpi1 = requests.get('http://www.stata-press.com/data/r12/wpi1.dta').content\n", + "wpi1 = requests.get('https://www.stata-press.com/data/r12/wpi1.dta').content\n", "data = pd.read_stata(BytesIO(wpi1))\n", "data.index = data.t\n", "\n", @@ -344,7 +344,7 @@ "outputs": [], "source": [ "# Dataset\n", - "air2 = requests.get('http://www.stata-press.com/data/r12/air2.dta').content\n", + "air2 = requests.get('https://www.stata-press.com/data/r12/air2.dta').content\n", "data = pd.read_stata(BytesIO(air2))\n", "data.index = pd.date_range(start=datetime(data.time[0], 1, 1), periods=len(data), freq='MS')\n", "data['lnair'] = np.log(data['air'])\n", @@ -406,7 +406,7 @@ "outputs": [], "source": [ "# Dataset\n", - "friedman2 = requests.get('http://www.stata-press.com/data/r12/friedman2.dta').content\n", + "friedman2 = requests.get('https://www.stata-press.com/data/r12/friedman2.dta').content\n", "data = pd.read_stata(BytesIO(friedman2))\n", "data.index = data.time\n", "\n", diff --git a/examples/notebooks/statespace_varmax.ipynb b/examples/notebooks/statespace_varmax.ipynb index a130bd3293c..093a01d058a 100644 --- a/examples/notebooks/statespace_varmax.ipynb +++ b/examples/notebooks/statespace_varmax.ipynb @@ -48,7 +48,7 @@ }, "outputs": [], "source": [ - "dta = sm.datasets.webuse('lutkepohl2', 'http://www.stata-press.com/data/r12/')\n", + "dta = sm.datasets.webuse('lutkepohl2', 'https://www.stata-press.com/data/r12/')\n", "dta.index = dta.qtr\n", "endog = dta.loc['1960-04-01':'1978-10-01', ['dln_inv', 'dln_inc', 'dln_consump']]" ] diff --git a/examples/python/generic_mle.py b/examples/python/generic_mle.py index 7f7b91e420a..cbbec986d36 100644 --- a/examples/python/generic_mle.py +++ b/examples/python/generic_mle.py @@ -132,8 +132,8 @@ def fit(self, start_params=None, maxiter=10000, maxfun=5000, **kwds): # # ### Usage Example # -# The [Medpar](http://vincentarelbundock.github.com/Rdatasets/doc/COUNT/medpar.html) -# dataset is hosted in CSV format at the [Rdatasets repository](http://vincentarelbundock.github.com/Rdatasets). We use the ``read_csv`` +# The [Medpar](https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/doc/COUNT/medpar.html) +# dataset is hosted in CSV format at the [Rdatasets repository](https://raw.githubusercontent.com/vincentarelbundock/Rdatasets). We use the ``read_csv`` # function from the [Pandas library](http://pandas.pydata.org) to load the data # in memory. We then print(the first few columns: # @@ -194,7 +194,7 @@ def fit(self, start_params=None, maxiter=10000, maxfun=5000, **kwds): # Or we could compare them to results obtained using the MASS implementation for R: # -# url = 'http://vincentarelbundock.github.com/Rdatasets/csv/COUNT/medpar.csv' +# url = 'https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/csv/COUNT/medpar.csv' # medpar = read.csv(url) # f = los~factor(type)+hmo+white # diff --git a/examples/python/regression_diagnostics.py b/examples/python/regression_diagnostics.py index f0dcceb2755..7a4c72b3f2e 100644 --- a/examples/python/regression_diagnostics.py +++ b/examples/python/regression_diagnostics.py @@ -1,7 +1,7 @@ ## Regression diagnostics -# This example file shows how to use a few of the ``statsmodels`` regression diagnostic tests in a real-life context. You can learn about more tests and find out more information abou the tests here on the [Regression Diagnostics page.](http://www.statsmodels.org/stable/diagnostic.html) +# This example file shows how to use a few of the ``statsmodels`` regression diagnostic tests in a real-life context. You can learn about more tests and find out more information abou the tests here on the [Regression Diagnostics page.](https://www.statsmodels.org/stable/diagnostic.html) # # Note that most of the tests described here only return a tuple of numbers, without any annotation. A full description of outputs is always included in the docstring and in the online ``statsmodels`` documentation. For presentation purposes, we use the ``zip(name,test)`` construct to pretty-print(short descriptions in the examples below. @@ -16,7 +16,7 @@ import statsmodels.stats.api as sms # Load data -url = 'http://vincentarelbundock.github.io/Rdatasets/csv/HistData/Guerry.csv' +url = 'https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/csv/HistData/Guerry.csv' dat = pd.read_csv(url) # Fit regression model (using the natural log of one of the regressors) @@ -59,7 +59,7 @@ print(plot_leverage_resid2(results)) -# Other plotting options can be found on the [Graphics page.](http://www.statsmodels.org/stable/graphics.html) +# Other plotting options can be found on the [Graphics page.](https://www.statsmodels.org/stable/graphics.html) # ## Multicollinearity # diff --git a/examples/python/regression_plots.py b/examples/python/regression_plots.py index 4d4da02b64e..077754a68c4 100644 --- a/examples/python/regression_plots.py +++ b/examples/python/regression_plots.py @@ -14,7 +14,7 @@ #### Load the Data -# We can use a utility function to load any R dataset available from the great Rdatasets package. +# We can use a utility function to load any R dataset available from the great Rdatasets package. prestige = sm.datasets.get_rdataset("Duncan", "carData", cache=True).data diff --git a/setup.py b/setup.py index ea3332eb12c..0d748040c94 100644 --- a/setup.py +++ b/setup.py @@ -56,8 +56,8 @@ DESCRIPTION = 'Statistical computations and models for Python' LONG_DESCRIPTION = README MAINTAINER = 'Josef Perktold, Chad Fulton, Kerby Shedden' -MAINTAINER_EMAIL ='pystatsmodels@googlegroups.com' -URL = 'http://www.statsmodels.org/' +MAINTAINER_EMAIL = 'pystatsmodels@googlegroups.com' +URL = 'https://www.statsmodels.org/' LICENSE = 'BSD License' DOWNLOAD_URL = '' diff --git a/statsmodels/datasets/tests/test_utils.py b/statsmodels/datasets/tests/test_utils.py index ae44e3b4db2..0089388e970 100644 --- a/statsmodels/datasets/tests/test_utils.py +++ b/statsmodels/datasets/tests/test_utils.py @@ -34,7 +34,7 @@ def test_webuse(): # test copied and adjusted from iolib/tests/test_foreign from statsmodels.iolib.tests.results.macrodata import macrodata_result as res2 res2 = np.array([list(row) for row in res2]) - base_gh = "http://github.com/statsmodels/statsmodels/raw/master/statsmodels/datasets/macrodata/" + base_gh = "https://github.com/statsmodels/statsmodels/raw/master/statsmodels/datasets/macrodata/" internet_available = check_internet(base_gh) if not internet_available: pytest.skip('Unable to retrieve file - skipping test') @@ -47,7 +47,7 @@ def test_webuse_pandas(): from pandas.util.testing import assert_frame_equal from statsmodels.datasets import macrodata dta = macrodata.load_pandas().data - base_gh = "http://github.com/statsmodels/statsmodels/raw/master/statsmodels/datasets/macrodata/" + base_gh = "https://github.com/statsmodels/statsmodels/raw/master/statsmodels/datasets/macrodata/" internet_available = check_internet(base_gh) if not internet_available: pytest.skip('Unable to retrieve file - skipping test') diff --git a/statsmodels/datasets/utils.py b/statsmodels/datasets/utils.py index c5084e8245f..b8afa611fcb 100644 --- a/statsmodels/datasets/utils.py +++ b/statsmodels/datasets/utils.py @@ -8,7 +8,7 @@ from pandas import read_stata, read_csv, DataFrame, Series, Index -def webuse(data, baseurl='http://www.stata-press.com/data/r11/', as_df=True): +def webuse(data, baseurl='https://www.stata-press.com/data/r11/', as_df=True): """ Download and return an example dataset from Stata. diff --git a/statsmodels/genmod/tests/results/results_glm.py b/statsmodels/genmod/tests/results/results_glm.py index 78a7c3fcf4e..e10f7c72748 100644 --- a/statsmodels/genmod/tests/results/results_glm.py +++ b/statsmodels/genmod/tests/results/results_glm.py @@ -685,7 +685,7 @@ class Lbw(object): ''' The LBW data can be found here - http://www.stata-press.com/data/r9/rmain.html + https://www.stata-press.com/data/r9/rmain.html ''' def __init__(self): # data set up for data not in datasets @@ -803,7 +803,7 @@ class Cancer(object): ''' The Cancer data can be found here - http://www.stata-press.com/data/r10/rmain.html + https://www.stata-press.com/data/r10/rmain.html ''' def __init__(self): filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), @@ -2202,7 +2202,7 @@ class Medpar1(object): ''' The medpar1 data can be found here. - http://www.stata-press.com/data/hh2/medpar1 + https://www.stata-press.com/data/hh2/medpar1 ''' def __init__(self): filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), diff --git a/statsmodels/sandbox/examples/example_nbin.py b/statsmodels/sandbox/examples/example_nbin.py index 86c786a0cdc..5ddb768df15 100644 --- a/statsmodels/sandbox/examples/example_nbin.py +++ b/statsmodels/sandbox/examples/example_nbin.py @@ -233,8 +233,8 @@ def _score_nbp(y, X, beta, thet, Q): from numpy.testing import assert_almost_equal import pandas import patsy -medpar = pandas.read_csv(urlopen('http://vincentarelbundock.github.com/Rdatasets/csv/COUNT/medpar.csv')) -mdvis = pandas.read_csv(urlopen('http://vincentarelbundock.github.com/Rdatasets/csv/COUNT/mdvis.csv')) +medpar = pandas.read_csv(urlopen('https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/csv/COUNT/medpar.csv')) +mdvis = pandas.read_csv(urlopen('https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/csv/COUNT/mdvis.csv')) # NB-2 ''' diff --git a/statsmodels/sandbox/examples/try_multiols.py b/statsmodels/sandbox/examples/try_multiols.py index 13d66a6a628..5d8a31cb947 100644 --- a/statsmodels/sandbox/examples/try_multiols.py +++ b/statsmodels/sandbox/examples/try_multiols.py @@ -25,7 +25,7 @@ print(res.to_string()) -url = "http://vincentarelbundock.github.com/" +url = "https://raw.githubusercontent.com/vincentarelbundock/" url = url + "Rdatasets/csv/HistData/Guerry.csv" df = pd.read_csv(url, index_col=1) #'dept') diff --git a/statsmodels/sandbox/multilinear.py b/statsmodels/sandbox/multilinear.py index 663975cb25d..138268f3492 100644 --- a/statsmodels/sandbox/multilinear.py +++ b/statsmodels/sandbox/multilinear.py @@ -281,7 +281,7 @@ def multigroup(pvals, groups, exact=True, keep_all=True, alpha=0.05): Examples -------- A toy example on a real dataset, the Guerry dataset from R - >>> url = "http://vincentarelbundock.github.com/" + >>> url = "https://raw.githubusercontent.com/vincentarelbundock/" >>> url = url + "Rdatasets/csv/HistData/Guerry.csv" >>> df = pd.read_csv(url, index_col='dept') diff --git a/statsmodels/tools/tests/test_web.py b/statsmodels/tools/tests/test_web.py index ed6f915a951..532fc64be0f 100644 --- a/statsmodels/tools/tests/test_web.py +++ b/statsmodels/tools/tests/test_web.py @@ -6,23 +6,23 @@ class TestWeb(object): def test_string(self): url = _generate_url('arch',True) - assert url == 'http://www.statsmodels.org/stable/search.html?q=arch&check_keywords=yes&area=default' + assert url == 'https://www.statsmodels.org/stable/search.html?q=arch&check_keywords=yes&area=default' url = _generate_url('arch',False) - assert url == 'http://www.statsmodels.org/devel/search.html?q=arch&check_keywords=yes&area=default' + assert url == 'https://www.statsmodels.org/devel/search.html?q=arch&check_keywords=yes&area=default' url = _generate_url('dickey fuller',False) - assert url == 'http://www.statsmodels.org/devel/search.html?q=dickey+fuller&check_keywords=yes&area=default' + assert url == 'https://www.statsmodels.org/devel/search.html?q=dickey+fuller&check_keywords=yes&area=default' def test_function(self): url = _generate_url(OLS, True) - assert url == 'http://www.statsmodels.org/stable/generated/statsmodels.regression.linear_model.OLS.html' + assert url == 'https://www.statsmodels.org/stable/generated/statsmodels.regression.linear_model.OLS.html' url = _generate_url(OLS, False) - assert url == 'http://www.statsmodels.org/devel/generated/statsmodels.regression.linear_model.OLS.html' + assert url == 'https://www.statsmodels.org/devel/generated/statsmodels.regression.linear_model.OLS.html' def test_nothing(self): url = _generate_url(None, True) - assert url == 'http://www.statsmodels.org/stable/' + assert url == 'https://www.statsmodels.org/stable/' url = _generate_url(None, False) - assert url == 'http://www.statsmodels.org/devel/' + assert url == 'https://www.statsmodels.org/devel/' def test_errors(self): with pytest.raises(ValueError): diff --git a/statsmodels/tools/web.py b/statsmodels/tools/web.py index 6761d28368d..d4681d3896b 100644 --- a/statsmodels/tools/web.py +++ b/statsmodels/tools/web.py @@ -7,7 +7,7 @@ from statsmodels.compat.python import urlencode from statsmodels.version import release -BASE_URL = 'http://www.statsmodels.org/' +BASE_URL = 'https://www.statsmodels.org/' def _generate_url(arg, stable): diff --git a/statsmodels/tsa/regime_switching/tests/test_markov_regression.py b/statsmodels/tsa/regime_switching/tests/test_markov_regression.py index cde097c5d6a..7f38f821551 100644 --- a/statsmodels/tsa/regime_switching/tests/test_markov_regression.py +++ b/statsmodels/tsa/regime_switching/tests/test_markov_regression.py @@ -20,7 +20,7 @@ current_path = os.path.dirname(os.path.abspath(__file__)) -# See http://www.stata-press.com/data/r14/usmacro +# See https://www.stata-press.com/data/r14/usmacro fedfunds = [1.03, 0.99, 1.34, 1.5, 1.94, 2.36, 2.48, 2.69, 2.81, 2.93, 2.93, 3.0, 3.23, 3.25, 1.86, 0.94, 1.32, 2.16, 2.57, 3.08, 3.58, 3.99, 3.93, 3.7, 2.94, 2.3, 2.0, 1.73, 1.68, 2.4, 2.46, 2.61, 2.85, @@ -43,7 +43,7 @@ 4.46, 4.91, 5.25, 5.25, 5.26, 5.25, 5.07, 4.5, 3.18, 2.09, 1.94, 0.51, 0.18, 0.18, 0.16, 0.12, 0.13, 0.19, 0.19, 0.19] -# See http://www.stata-press.com/data/r14/usmacro +# See https://www.stata-press.com/data/r14/usmacro ogap = [-0.53340107, 0.72974336, 2.93532324, 3.58194304, 4.15760183, 4.28775644, 3.01683831, 2.64185619, 1.82473528, 2.37461162, 2.39338565, 1.24197006, 1.1370815, -1.28657401, -4.46665335, @@ -91,7 +91,7 @@ -7.43927145, -6.89403868, -6.8306222, -6.26507998, -5.93287086, -5.59370756] -# See http://www.stata-press.com/data/r14/usmacro +# See https://www.stata-press.com/data/r14/usmacro inf = [np.nan, np.nan, np.nan, np.nan, -0.2347243, 0.37373397, 0.25006533, 1.04645514, 2.01665616, 2.58033299, 3.41399837, 3.60986805, 3.46304512, 3.08529949, 3.45609665, @@ -139,7 +139,7 @@ -1.60695589, 1.48749816, 2.33687115, 1.78588998, 1.22873163, 1.21550024] -# See http://www.stata-press.com/data/r14/snp500 +# See https://www.stata-press.com/data/r14/snp500 areturns = [1.60864139, 0.6581642, 0.91177338, 1.88970506, 0.76378739, 0.10790635, 0.29509732, 0.16913767, 1.30772412, 0.85901159, 0.92307973, @@ -272,7 +272,7 @@ 0.37556711, 0.44287458, 0.34578958, 1.48449266, 1.95924711, 0.09717447] -# See http://www.stata-press.com/data/r14/mumpspc +# See https://www.stata-press.com/data/r14/mumpspc # Note that this has already been seasonally differenced at period 12 mumpspc = [0.29791319, 0.41467956, 1.13061404, 1.23267496, 1.55659747, 1.41078568, 0.45335022, 0.1419628, diff --git a/statsmodels/tsa/statespace/tests/results/results_sarimax.py b/statsmodels/tsa/statespace/tests/results/results_sarimax.py index 081cee7015a..a5d5b089b0c 100644 --- a/statsmodels/tsa/statespace/tests/results/results_sarimax.py +++ b/statsmodels/tsa/statespace/tests/results/results_sarimax.py @@ -6,9 +6,9 @@ Data from: -http://www.stata-press.com/data/r12/wpi1 -http://www.stata-press.com/data/r12/air2 -http://www.stata-press.com/data/r12/friedman2 +https://www.stata-press.com/data/r12/wpi1 +https://www.stata-press.com/data/r12/air2 +https://www.stata-press.com/data/r12/friedman2 Author: Chad Fulton License: Simplified-BSD diff --git a/statsmodels/tsa/statespace/tests/results/results_var_R.py b/statsmodels/tsa/statespace/tests/results/results_var_R.py index 015c82941b8..b495850b76f 100644 --- a/statsmodels/tsa/statespace/tests/results/results_var_R.py +++ b/statsmodels/tsa/statespace/tests/results/results_var_R.py @@ -6,7 +6,7 @@ Data from: -http://www.stata-press.com/data/r14/lutkepohl2.dta +https://www.stata-press.com/data/r14/lutkepohl2.dta Author: Chad Fulton License: Simplified-BSD diff --git a/statsmodels/tsa/statespace/tests/results/test_sarimax_coverage.do b/statsmodels/tsa/statespace/tests/results/test_sarimax_coverage.do index 552b5ec9f6a..90a5ae9c732 100644 --- a/statsmodels/tsa/statespace/tests/results/test_sarimax_coverage.do +++ b/statsmodels/tsa/statespace/tests/results/test_sarimax_coverage.do @@ -1,5 +1,5 @@ // Dataset -use http://www.stata-press.com/data/r12/wpi1, clear +use https://www.stata-press.com/data/r12/wpi1, clear rename t time set more off diff --git a/statsmodels/tsa/statespace/tests/results/test_sarimax_stata.do b/statsmodels/tsa/statespace/tests/results/test_sarimax_stata.do index 1d66626a5cf..c6a69aadabd 100644 --- a/statsmodels/tsa/statespace/tests/results/test_sarimax_stata.do +++ b/statsmodels/tsa/statespace/tests/results/test_sarimax_stata.do @@ -1,5 +1,5 @@ // Example 1: ARIMA model -use http://www.stata-press.com/data/r12/wpi1, clear +use https://www.stata-press.com/data/r12/wpi1, clear arima wpi, arima(1,1,1) vce(opg) arima wpi, arima(1,1,1) vce(oim) arima wpi, arima(1,1,1) vce(robust) @@ -22,31 +22,33 @@ predict dep // Example 2: ARIMA model with additive seasonal effects arima D.ln_wpi, ar(1) ma(1 4) vce(opg) -arima D.ln_wpi, ar(1) ma(1 4) vce(oim) +arima D.ln_wpi, ar(1) ma(1 4) vce(oim) // Example 3: Multiplicative SARIMA model -use http://www.stata-press.com/data/r12/air2, clear -generate lnair = ln(air) +use https://www.stata-press.com/data/r12/air2, clear +generate lnair = ln(air) arima lnair, arima(0,1,1) sarima(0,1,1,12) noconstant vce(opg) arima lnair, arima(0,1,1) sarima(0,1,1,12) noconstant vce(oim) // Example 4: ARMAX model -use http://www.stata-press.com/data/r12/friedman2, clear +use https://www.stata-press.com/data/r12/friedman2, clear arima consump m2 if tin(, 1981q4), ar(1) ma(1) vce(opg) -arima consump m2 if tin(, 1981q4), ar(1) ma(1) vce(oim) +arima consump m2 if tin(, 1981q4), ar(1) ma(1) vce(oim) // Predict - Example 1: Predict, dynamic forecasts -use http://www.stata-press.com/data/r12/friedman2, clear -keep if time<=tq(1981q4) arima consump m2 if tin(, 1978q1), ar(1) ma(1) +use https://www.stata-press.com/data/r12/friedman2, clear +keep if time<=tq(1981q4) +arima consump m2 if tin(, 1978q1), ar(1) ma(1) predict chat, y -predict chatdy, dynamic(tq(1978q1)) y +predict chatdy, dynamic(tq(1978q1)) y + // Predict - Example 1, part 2: Forecasts // Note: in the previous example, because `consump` // was still non-missing for the "out-of-sample" component, it simply // amounts to in-sample prediction with fixed parameter (that happen // to have been defined by MLE on a subset of the observations) // Here make those observations missing so that we get true forecasts. -use http://www.stata-press.com/data/r12/friedman2, clear +use https://www.stata-press.com/data/r12/friedman2, clear keep if time<=tq(1981q4) & time>=tq(1959q1) arima consump m2 if tin(, 1978q1), ar(1) ma(1) replace consump = . if time>tq(1978q1) diff --git a/statsmodels/tsa/statespace/tests/results/test_varmax_stata.do b/statsmodels/tsa/statespace/tests/results/test_varmax_stata.do index 0758302fd0f..859926a2beb 100644 --- a/statsmodels/tsa/statespace/tests/results/test_varmax_stata.do +++ b/statsmodels/tsa/statespace/tests/results/test_varmax_stata.do @@ -94,7 +94,7 @@ outsheet pred* dyn* fcas* using results_var_stata.csv, comma replace // VARMA(1,1) // Note: Stata does not have this built-in, so we need to create the state space form ourselves // This replicates example 4 from the Stata documentation -use http://www.stata-press.com/data/r12/manufac, clear +use https://www.stata-press.com/data/r12/manufac, clear gen dlncaputil = D.lncaputil gen dlnhours = D.lnhours diff --git a/statsmodels/tsa/statespace/tests/results/test_wpi1_stata.do b/statsmodels/tsa/statespace/tests/results/test_wpi1_stata.do index bda1793d38e..3924ce59582 100644 --- a/statsmodels/tsa/statespace/tests/results/test_wpi1_stata.do +++ b/statsmodels/tsa/statespace/tests/results/test_wpi1_stata.do @@ -1,4 +1,4 @@ -use http://www.stata-press.com/data/r12/wpi1, clear +use https://www.stata-press.com/data/r12/wpi1, clear gen dwpi = D.wpi // Estimate an AR(3) via a state-space model diff --git a/tools/binstar/meta.yaml b/tools/binstar/meta.yaml index 6ff45f8dbe4..2510b91962a 100644 --- a/tools/binstar/meta.yaml +++ b/tools/binstar/meta.yaml @@ -31,5 +31,5 @@ test: - statsmodels about: - home: http://www.statsmodels.org/ + home: https://www.statsmodels.org/ license : BSD License \ No newline at end of file diff --git a/tools/cythonize.py b/tools/cythonize.py index 51cf94e37b2..a118b9b60da 100755 --- a/tools/cythonize.py +++ b/tools/cythonize.py @@ -24,7 +24,7 @@ Originally written by Dag Sverre Seljebotn, and copied here from: -https://raw.github.com/dagss/private-scipy-refactor/cythonize/cythonize.py +https://raw.githubusercontent.com/dagss/private-scipy-refactor/cythonize/cythonize.py Note: this script does not check any of the dependent C libraries; it only operates on the Cython .pyx files. diff --git a/tools/update_web.py b/tools/update_web.py index a523125b7b1..6453853585b 100755 --- a/tools/update_web.py +++ b/tools/update_web.py @@ -133,7 +133,7 @@ def check_version(branch, latest_hash=None): remote_dir = 'stable' regex = ("(?<=This documentation is for the )(\d{1}\.\d{1}\.\d{1})" "(?= release.)") - base_url = 'http://www.statsmodels.org/{}' + base_url = 'https://www.statsmodels.org/{}' page = urlopen(base_url.format(remote_dir)).read() try: