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==1.0.0
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tvslr-1.0.1.tar.gz.
File metadata
- Download URL: tvslr-1.0.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aef30c2ae39f38a0102bc66079366c5d8489164ba50973a78595b39b9ad977cb
|
|
| MD5 |
84cd5c0303c501fb8e092b4aec227b54
|
|
| BLAKE2b-256 |
03a18e2c2cdea099e76caf54e5c147f38a019d4b41d52c2591a9fe3ee9fb74ad
|
File details
Details for the file tvslr-1.0.1-py3-none-any.whl.
File metadata
- Download URL: tvslr-1.0.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4901a3d838fb1d5ec7adb79d86db8ccc9ef506f541524a8c3a0eecd7263b1f56
|
|
| MD5 |
be0e174817a1fd00ba95c48bf39b5aba
|
|
| BLAKE2b-256 |
a75e1d16f2e176a9ad0300da799bfb7d537f915a453286365808046bef4b7947
|