Skip to main content

time varying SLR using OLS estimates

Project description

tv-slr

Implementation of time-varying SLR using OLS estimates

Idea

One of the basic assumptions of the general linear model is that the parameters are constant over time. It has been often suggested that this may not be the valid assumption to make. In cross section studies there can be heterogeneity in the parameters across different units, where as in time series studies there can be variation over time in the parameters... paper link

Installation

pip install tvslr

Usage

In python

    from tvslr.tvslr import TVSLR
    """
        X:= numpy array containing the independent feature vectors
        y:= numpy array containing dependent variable
        n:= subset size (must be greater than number of independent features including intercept variable)
    """

    reg = TVSLR(X, y, n)
    betas = reg.run()
    print(betas)
    print("R-squared:", reg.cod)
    print("Adj. R-squared:", reg.adj_cod)

In command prompt

    python -m tvslr <excel filename> <sheetname> <subset size>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tvslr-2.0.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tvslr-2.0.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file tvslr-2.0.0.tar.gz.

File metadata

  • Download URL: tvslr-2.0.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for tvslr-2.0.0.tar.gz
Algorithm Hash digest
SHA256 b20fc1d27416eb4839461b61177350b4ca6d5ca43b777c484e36318513bb96aa
MD5 d8ce6fc9cfce295d360363445b534ef3
BLAKE2b-256 49b0feffae404b58841b3aaa921baedb5e97fcc0e75f1f0630494d2a39bab7d0

See more details on using hashes here.

File details

Details for the file tvslr-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: tvslr-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for tvslr-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbdb5d172b42f23e80da23043dfc57893bf11859d708d09f0ffcc7914ecb836d
MD5 0f0fe11d1f8267f9ea07d6efc413cee1
BLAKE2b-256 f05d9798fbc94834e28489ff404a3b342e74c6ccd2a5b1400cc4694aa24a97eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page