Skip to main content

olr: Optimal Linear Regression

Project description

The olr function runs all the possible combinations of linear regressions with all of the dependent variables against the independent variable and returns the statistical summary of either the greatest adjusted R-squared or R-squared term. Adding an additional explanatory variable to the regression equation increases the R-squared or adjusted R-squared terms even if the variable is not 'significant'. Thus, adjusted R-squared was preferred, but this was developed to eliminate that conundrum.

dataset = pd.read_csv('C:\Rstuff\olr\inst\extdata\oildata.csv') responseName = datasetname[['OilPrices']] predictorNames = datasetname[['SP500', 'RigCount', 'API', 'Field_Production', 'RefinerNetInput', 'OperableCapacity', 'Imports', 'StocksExcludingSPR']]

The TRUE or FALSE in the olr function, specifies either the adjusted R-squared or the R-squared regression summary, respectfully.

When responseName and predictorNames are None (NULL), then the first column in the dataset is set as the responseName and the remaining columns are the predictorNames.

Adjusted R-squared
olr(datasetname, resvarname = None, expvarnames = None, adjr2 = "True")

R-squared
olr(datasetname, resvarname = None, expvarnames = None, adjr2 = "False")

list of summaries
olrmodels(datasetname, resvarname = None, expvarnames = None)

list of formulas
olrformulas(datasetname, resvarname = None, expvarnames = None)

list of forumlas with the dependant variables in ascending order
olrformulasorder(datasetname, resvarname = None, expvarnames = None)

the list of adjusted R-squared terms
adjr2list(datasetname, resvarname = None, expvarnames = None)

the list of R-squared terms
r2list(datasetname, resvarname = None, expvarnames = None)

An R version of this package olr is available on CRAN.

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

olr-1.3.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

olr-1.3.1-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file olr-1.3.1.tar.gz.

File metadata

  • Download URL: olr-1.3.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for olr-1.3.1.tar.gz
Algorithm Hash digest
SHA256 c1b5253549b5cc345e122ee22d9c75b8e0f33aa857cc9fcde870b0d06273a2c5
MD5 7c0fb3047c8616061879af89ea36f023
BLAKE2b-256 556eef1c303d8fc554d47121e4671485ec37219a32964c775a7b53c92f2aa56f

See more details on using hashes here.

File details

Details for the file olr-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: olr-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for olr-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1e6d755b742fc4f0bcb967eb1e86edab3ed6d81859fe7eca16da08f96fefcb52
MD5 7305cec35903e784b28816962a064108
BLAKE2b-256 893cf1be69f21b838e62fb619d3d7b78d08d27082c221f96a9c527dbe4b4e3c1

See more details on using hashes here.

Supported by

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