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-1.0.2.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-1.0.2-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tvslr-1.0.2.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-1.0.2.tar.gz
Algorithm Hash digest
SHA256 a5d9c97f802e70fe6ef23c1bffb7203e87ab7f26529e4b2f87fc3adf2d22e084
MD5 b7b2278c6c9a366940181ef614a83fb0
BLAKE2b-256 fe3ffb8898544af9aab47de36d33fab3f100cafa1f16b5ee4bc47a0602e0b045

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tvslr-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d15eadad33235a8466b15ebbe34a1ef01a29f865a156460b3a1851adbe5395c9
MD5 aefaef54a8254c55138a3f01289a271c
BLAKE2b-256 8e089076fbdd80f5d3559245d21e4ed51e03856ba644b997e011306bf193bd29

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