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. R-squared increases with the addition of an explanatory variable whether it is 'significant' or not, thus this was developed to eliminate that conundrum. Adjusted R-squared is preferred to overcome this phenomenon, but each combination will still produce different results and this will return the best one.
dataset = pd.read_csv('C:\Rstuff\olr\inst\extdata\oildata.csv')
responseName = dataset[['OilPrices']]
predictorNames = dataset[['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
Release history Release notifications | RSS feed
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
File details
Details for the file olr-1.3.4.tar.gz
.
File metadata
- Download URL: olr-1.3.4.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 472452d25d27dd60c7bc07e254244e1a067ed6d94461c67cc567949733475de9 |
|
MD5 | 9713078c3e68e5e184015e117092cc76 |
|
BLAKE2b-256 | 9a31a40f7a3aa8b12a067ee4197ed6a0f9e4f7236fc3553210d332066f09e71a |
File details
Details for the file olr-1.3.4-py3-none-any.whl
.
File metadata
- Download URL: olr-1.3.4-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3794bd793393a292839bbbb09c12a6a3c4c23c0eb3d0ed29a25d6c02f271588f |
|
MD5 | b4ccd5b2d2fe5753d56b578f2966f5e4 |
|
BLAKE2b-256 | 0c43e075c086d018c1e7d5b9ae654fd76391f66acacabde63687d76e83228f00 |