Skip to main content

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>

Metadata

Release files for tvslr 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tvslr 2.0.0
File Size Uploaded
tvslr-2.0.0.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tvslr 2.0.0
File Interpreter ABI Platform
tvslr-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.9 kB

Release files / tvslr-2.0.0.tar.gz

Download URL tvslr-2.0.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b20fc1d27416eb4839461b61177350b4ca6d5ca43b777c484e36318513bb96aa
BLAKE2b-256 checksum
How to use checksums
49b0feffae404b58841b3aaa921baedb5e97fcc0e75f1f0630494d2a39bab7d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release files / tvslr-2.0.0-py3-none-any.whl

Download URL tvslr-2.0.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cbdb5d172b42f23e80da23043dfc57893bf11859d708d09f0ffcc7914ecb836d
BLAKE2b-256 checksum
How to use checksums
f05d9798fbc94834e28489ff404a3b342e74c6ccd2a5b1400cc4694aa24a97eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page