|int __stdcall NDK_PCR_STEPWISE||(||double **||X,|
Returns an array of cells for the i-th principal component (or residuals).
- status code of the operation
- Return values
NDK_SUCCESS Operation successful NDK_FAILED Operation unsuccessful. See Macros for full list.
[in] X is the independent variables data matrix, such that each column represents one variable [in] nXSize is the number of observations (i.e. rows) in X [in] nXVars is the number of variables (i.e. columns) in X [in] mask is the boolean array to select a subset of the input variables in X. If missing (i.e. NULL), all variables in X are included. [in] nMaskLen is the number of elements in mask [in] Y is the response or the dependent variable data array (one dimensional array) [in] nYSize is the number of elements in Y [in] intercept is the constant or the intercept value to fix (e.g. zero). If missing (NaN), an intercept will not be fixed and is computed normally [in] alpha is the statistical significance of the test (i.e. alpha) [in] nMode is a switch to select the variable's inclusion/exclusion approach (1=forward selection (default), 2=backward elimination , 3=bi-directional elimination):
- Forward selection
- Backward elimination
- Bi-directional elimination
- The underlying model is described here.
- The stepwise regression includes regression models in which the choice of predictive variables is carried out by an automatic procedure. The procedure takes the form of a sequence of f-tests in selecting or eliminating explanatory variables.
- The three main approaches are:
- Forward Selection, which involves starting with no variables in the model, testing the addition of each variable using a chosen model comparison criterion, adding the variable (if any) that improves the model the most, and repeating this process until no further improvement is possible.
- Backward Elimination, which involves starting with all candidate variables, testing the deletion of each variable using a chosen model comparison criterion, deleting the variable (if any) that improves the model the most by being deleted, and repeating this process until no further improvement is possible.
- Bi-directional Elimination, a combination of the above tests, involves testing at each step for variables to be included or excluded.
- The initial values in the mask array define the variables set that MLR_STEPWISE works with. In other words, variables which are not selected will not be considered during the regression.
- The sample data may include missing values.
- Each column in the input matrix corresponds to a separate variable.
- Each row in the input matrix corresponds to an observation.
- Observations (i.e. row) with missing values in X or Y are removed.
- The number of rows of the response variable (Y) must be equal to the number of rows of the explanatory variables (X).
- The MLR_STEPWISE function is available starting with version 1.60 APACHE.
Header SFSDK.H Library SFSDK.LIB DLL SFSDK.DLL