Skip to content
/ tv-slr Public

Implementation of time-varying SLR using OLS estimates

License

Notifications You must be signed in to change notification settings

arka816/tv-slr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

Implementation of time-varying SLR using OLS estimates

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages