Skip to main content

variable.method_select

forward(y,X)

back (y,X)

This package executes the forward and backward selection procedures to aid in selecting variables for inclusion in an OLS regression model.

The forward selection procedure starts with an equation containing no predictor varaibles, only a constant that must be added by the user. To identify the first variable to include in the equation, the independent variable with the highest simple correlation to the response variable is selected and included in an OLS regression. If An evaluation of the independent variable's p-value is completed, and if the variable proves significantly different from zero, it is retained in the equation and a review for a second variable is initiated. To identify a second variable, a correlation with the remaining variables is completed against the residuals from the previous OLS regression. The independent variable with the highest correlation to the residuals is selected as the second variable, which is included in a subsequent OLS regression. If the p-value of this second variable proves significant from zero, this second variable is retained and the search for a third variable is initiated. This process continues for all available variables.

The backward selection procedure starts with all variables including a constant that must be added by the user, and systematically removes the variable with the smallest t-value in each iteration.

To initiate the function, the user must specify the target variable (y) and the independent variable(s) (X).

The output of this package is a table showing the order in which the variables were evaluated, as well as validation factors used for evaluating variables for inclusion in a model. The user should review the table and make determinations based on their preferences.

This variable selection package was developed based on the procedure as described in Chatterjee, Samprit and Hadi, Ali S (2012). Regression Analysis by Example (5th ed.). Hoboken, New Jersey: John Wiley & Sons, Inc.

Release files for variable 0.0.4

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

Source distribution (sdist)

Source distribution for variable 0.0.4
File Size Uploaded
variable-0.0.4.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for variable 0.0.4
File Interpreter ABI Platform
variable-0.0.4-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 9.7 kB

Release files / variable-0.0.4.tar.gz

Download URL variable-0.0.4.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
efd2e912b4de2c5b03a37818169b65647c8f5ad41ffa2cb51849dc2fedf41461
BLAKE2b-256 checksum
How to use checksums
b8686678328a85de5c9b07ddffeef9991d5cf7fd0a1858e31a0fe0f841ffd481
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.4

Release files / variable-0.0.4-py2.py3-none-any.whl

Download URL variable-0.0.4-py2.py3-none-any.whl
Size 5.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
a5133a6cc55a75f3a9231046a3ec632f2b8945380fae74853d66d75440102704
BLAKE2b-256 checksum
How to use checksums
14c9be43b15915411e32370218b8fdb2e523797016bf6d0e88b4e53044ee07da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.4

Release history Release notifications | RSS feed

This release

0.0.4 This release

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