Multiple Linear Regression (MLR) More...
Functions | |
int __stdcall | NDK_SLR_PARAM (double *pXData, size_t nXSize, double *pYData, size_t nYSize, double intercept, double alpha, WORD nRetType, WORD ParamIndex, double *retVal) |
Calculates the OLS regression coefficient values. | |
int __stdcall | NDK_SLR_FORE (double *pXData, size_t nXSize, double *pYData, size_t nYSize, double intercept, double target, double alpha, WORD nRetType, double *retVal) |
Calculates the forecast value, error, and confidence interval for a regression model. | |
int __stdcall | NDK_SLR_FITTED (double *pXData, size_t nXSize, double *pYData, size_t nYSize, double intercept, WORD nRetType) |
Returns an array of cells for the conditional mean (or residuals) fitted values. | |
int __stdcall | NDK_SLR_ANOVA (double *pXData, size_t nXSize, double *pYData, size_t nYSize, double intercept, WORD nRetType, double *retVal) |
Calculates the regression model analysis of the variance (ANOVA) values. | |
int __stdcall | NDK_SLR_GOF (double *pXData, size_t nXSize, double *pYData, size_t nYSize, double intercept, WORD nRetType, double *retVal) |
Calculates a measure for the goodness of fit (e.g., LLF, R^2, etc.). | |
int __stdcall | NDK_MLR_PARAM (double **pXData, size_t nXSize, size_t nXVars, LPBYTE mask, size_t nMaskLen, double *pYData, size_t nYSize, double intercept, double alpha, WORD nRetType, WORD ParamIndex, double *retVal) |
Calculates the OLS regression coefficient values. | |
int __stdcall | NDK_MLR_FORE (double **pXData, size_t nXSize, size_t nXVars, LPBYTE mask, size_t nMaskLen, double *pYData, size_t nYSize, double intercept, double *target, double alpha, WORD nRetType, double *retVal) |
Calculates the forecast mean, error, and confidence interval. | |
int __stdcall | NDK_MLR_FITTED (double **pXData, size_t nXSize, size_t nXVars, LPBYTE mask, size_t nMaskLen, double *pYData, size_t nYSize, double intercept, WORD nRetType) |
Returns an array of cells for the fitted values of the conditional mean, residuals, or leverage measures. | |
int __stdcall | NDK_MLR_ANOVA (double **pXData, size_t nXSize, size_t nXVars, LPBYTE mask, size_t nMaskLen, double *pYData, size_t nYSize, double intercept, WORD nRetType, double *retVal) |
Calculates the regression model analysis of variance (ANOVA) values. | |
int __stdcall | NDK_MLR_GOF (double **pXData, size_t nXSize, size_t nXVars, LPBYTE mask, size_t nMaskLen, double *pYData, size_t nYSize, double intercept, WORD nRetType, double *retVal) |
Calculates a measure for the goodness of fit (e.g., LLF, AIC, R^2, etc.). | |
int __stdcall | NDK_MLR_PRFTest (double **pXData, size_t nXSize, size_t nXVars, double *pYData, size_t nYSize, double intercept, LPBYTE mask1, size_t nMaskLen1, LPBYTE mask2, size_t nMaskLen2, double alpha, WORD nRetType, double *retVal) |
Calculates the p-value and related statistics of the partial f-test (used for testing the inclusion/exclusion variables). | |
int __stdcall | NDK_MLR_STEPWISE (double **pXData, size_t nXSize, size_t nXVars, LPBYTE mask, size_t nMaskLen, double *pYData, size_t nYSize, double intercept, double alpha, WORD nMode) |
Returns a list of the selected variables after performing the stepwise regression. | |
Given a data set \(\{y_i,\, x_{i1}, \ldots, x_{ip}\}_{i=1}^n\) of n statistical units, a linear regression model assumes that the relationship between the dependent variable yi and the p-vector of regressors xi is linear. This relationship is modeled through a disturbance term or error variable εi — an unobserved random variable that adds noise to the linear relationship between the dependent and regressors.
int __stdcall NDK_MLR_ANOVA | ( | double ** | pXData, |
size_t | nXSize, | ||
size_t | nXVars, | ||
LPBYTE | mask, | ||
size_t | nMaskLen, | ||
double * | pYData, | ||
size_t | nYSize, | ||
double | intercept, | ||
WORD | nRetType, | ||
double * | retVal ) |
Calculates the regression model analysis of the variance (ANOVA) values.
[in] | pXData | (Required) is the independent (explanatory) variables data matrix, such that each column represents one variable. | ||||||||||||||||
[in] | nXSize | (Required) is the number of observations in pXData . | ||||||||||||||||
[in] | nXVars | (Required) is the number of independent (explanatory) variables (columns) in pXData . | ||||||||||||||||
[in] | mask | (Required) is the boolean array to choose the explanatory variables in the model. If missing, all variables in X are included. | ||||||||||||||||
[in] | nMaskLen | (Required) is the number of elements in the mask . | ||||||||||||||||
[in,out] | pYData | (Required) is the response or the dependent variable data array (one dimensional array of cells). | ||||||||||||||||
[in] | nYSize | (Required) is the number of observations in pYData . | ||||||||||||||||
[in] | intercept | (Required) is the constant or the intercept value to fix (e.g., zero). If missing (i.e., NaN), an intercept will not be fixed and is computed typically. | ||||||||||||||||
[in] | nRetType | (Required) is a switch to select the output (1 = SSR (default), 2 = SSE, 3 = SST, 4 = MSR, 5 = MSE, 6 = F-Stat, 7 = Significance F).
| ||||||||||||||||
[out] | retVal | (Required) is a pointer to a variable to hold the calculated ANOVA statistics. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_EMPTY_TIME_SERIES | (see remarks) |
NDK_FAILED | failed |
nSize
is zero, the function will fail and return NDK_INVALID_ARG.pData
argument is NULL, the function will fails and return NDK_INVALID_ARG.nSixe
argument with the number of non-missing values in the array. Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll |
int __stdcall NDK_MLR_FITTED | ( | double ** | pXData, |
size_t | nXSize, | ||
size_t | nXVars, | ||
LPBYTE | mask, | ||
size_t | nMaskLen, | ||
double * | pYData, | ||
size_t | nYSize, | ||
double | intercept, | ||
WORD | nRetType ) |
Returns the fitted values of the conditional mean, residuals or leverage measures.
[in] | pXData | (Required) is the independent (explanatory) variables data matrix, such that each column represents one variable. | ||||||||||||
[in] | nXSize | (Required) is the number of observations in pXData . | ||||||||||||
[in] | nXVars | (Required) is the number of independent (explanatory) variables (columns) in pXData . | ||||||||||||
[in] | mask | (Required) is the boolean array to choose the explanatory variables in the model. If missing, all variables in X are included. | ||||||||||||
[in] | nMaskLen | (Required) is the number of elements in the mask . | ||||||||||||
[in,out] | pYData | (Required) is the response or the dependent variable data array (one dimensional array of cells). | ||||||||||||
[in] | nYSize | (Required) is the number of observations in pYData . | ||||||||||||
[in] | intercept | (Required) is the constant or the intercept value to fix (e.g., zero). If missing (i.e., NaN), an intercept will not be fixed and is computed typically. | ||||||||||||
[in] | nRetType | (Required) is a switch to select the return output (1 = fitted values (default), 2 = residuals, 3 = std. residuals, 4 = X (cleaned), 5 = Y (cleaned)).
|
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_EMPTY_TIME_SERIES | (see remarks) |
NDK_FAILED | failed |
nSize
is zero, the function will fail and return NDK_INVALID_ARG.pData
argument is NULL, the function will fails and return NDK_INVALID_ARG.nSixe
argument with the number of non-missing values in the array. Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll |
int __stdcall NDK_MLR_FORE | ( | double ** | pXData, |
size_t | nXSize, | ||
size_t | nXVars, | ||
LPBYTE | mask, | ||
size_t | nMaskLen, | ||
double * | pYData, | ||
size_t | nYSize, | ||
double | intercept, | ||
double * | target, | ||
double | alpha, | ||
WORD | nRetType, | ||
double * | retVal ) |
Calculates the forecast mean, error and confidence interval.
[in] | pXData | (Required) is the independent (explanatory) variables data matrix, such that each column represents one variable. | ||||||||||
[in] | nXSize | (Required) is the number of observations in pXData . | ||||||||||
[in] | nXVars | (Required) is the number of independent (explanatory) variables (columns) in pXData . | ||||||||||
[in] | mask | (Required) is the boolean array to choose the explanatory variables in the model. If missing, all variables in X are included. | ||||||||||
[in] | nMaskLen | (Required) is the number of elements in the mask . | ||||||||||
[in] | pYData | (Required) is the response or the dependent variable data array (one dimensional array of cells). | ||||||||||
[in] | nYSize | (Required) is the number of observations in pYData . | ||||||||||
[in] | intercept | (Required) is the constant or the intercept value to fix (e.g., zero). If missing (i.e., NaN), an intercept will not be fixed and is computed typically. | ||||||||||
[in] | target | (Required) is the value of the explanatory variables (a one dimensional array). | ||||||||||
[in] | alpha | (Required) is the statistical significance or confidence level (i.e. alpha). If missing or omitted, an alpha value of 5% is assumed. | ||||||||||
[in] | nRetType | (Required) is a switch to select the return output (1 = Mean Value (default), 2 = Std Error, 3 = Test Score, 4 = P-Value, 5 = Upper Value, 6 = Lower Value).
| ||||||||||
[out] | retVal | (Required) is a pointer to a variable to hold the calculated forecast statistics. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_EMPTY_TIME_SERIES | (see remarks) |
NDK_FAILED | failed |
nSize
is zero, the function will fail and return NDK_INVALID_ARG.pData
argument is NULL, the function will fails and return NDK_INVALID_ARG.nSixe
argument with the number of non-missing values in the array. Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll |
int __stdcall NDK_MLR_GOF | ( | double ** | pXData, |
size_t | nXSize, | ||
size_t | nXVars, | ||
LPBYTE | mask, | ||
size_t | nMaskLen, | ||
double * | pYData, | ||
size_t | nYSize, | ||
double | intercept, | ||
WORD | nRetType, | ||
double * | retVal ) |
Calculates a measure for the goodness of fit (e.g., R^2).
[in] | pXData | (Required) is the independent (explanatory) variables data matrix, such that each column represents one variable. | ||||||||||||||
[in] | nXSize | (Required) is the number of observations in pXData . | ||||||||||||||
[in] | nXVars | (Required) is the number of independent (explanatory) variables (columns) in pXData . | ||||||||||||||
[in] | mask | (Required) is the boolean array to choose the explanatory variables in the model. If missing, all variables in X are included. | ||||||||||||||
[in] | nMaskLen | (Required) is the number of elements in the mask . | ||||||||||||||
[in] | pYData | (Required) is the response or the dependent variable data array (one dimensional array of cells). | ||||||||||||||
[in] | nYSize | (Required) is the number of observations in pYData . | ||||||||||||||
[in] | intercept | (Required) is the constant or the intercept value to fix (e.g., zero). If missing (i.e., NaN), an intercept will not be fixed and is computed typically. | ||||||||||||||
[in] | nRetType | (Required) is a switch to select the return output (1 = R-Square (default), 2 = Adj. R-Square, 3 = RMSE, 4 = LLF, 5 = AIC, 6 = SIC/BIC)..
| ||||||||||||||
[out] | retVal | (Required) is a pointer to a variable to hold the calculated forecast statistics. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_EMPTY_TIME_SERIES | (see remarks) |
NDK_FAILED | failed |
nSize
is zero, the function will fail and return NDK_INVALID_ARG.pData
argument is NULL, the function will fails and return NDK_INVALID_ARG.nSixe
argument with the number of non-missing values in the array. Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll |
int __stdcall NDK_MLR_PARAM | ( | double ** | pXData, |
size_t | nXSize, | ||
size_t | nXVars, | ||
LPBYTE | mask, | ||
size_t | nMaskLen, | ||
double * | pYData, | ||
size_t | nYSize, | ||
double | intercept, | ||
double | alpha, | ||
WORD | nRetType, | ||
WORD | ParamIndex, | ||
double * | retVal ) |
Calculates the OLS regression coefficients values.
[in] | pXData | (Required) is the independent (explanatory) variables data matrix, such that each column represents one variable. | ||||||||||||||
[in] | nXSize | (Required) is the number of observations in pXData . | ||||||||||||||
[in] | nXVars | (Required) is the number of independent (explanatory) variables (columns) in pXData . | ||||||||||||||
[in] | mask | (Required) is the boolean array to choose the explanatory variables in the model. If missing, all variables in X are included. | ||||||||||||||
[in] | nMaskLen | (Required) is the number of elements in the mask . | ||||||||||||||
[in] | pYData | (Required) is the response or the dependent variable data array (one dimensional array of cells). | ||||||||||||||
[in] | nYSize | (Required) is the number of observations in pYData . | ||||||||||||||
[in] | intercept | (Required) is the constant or the intercept value to fix (e.g., zero). If missing (i.e., NaN), an intercept will not be fixed and is computed typically. | ||||||||||||||
[in] | alpha | (Required) is the statistical significance or confidence level (i.e. alpha). If missing or omitted, an alpha value of 5% is assumed. | ||||||||||||||
[in] | nRetType | (Required) is a switch to select the return output (1 = Mean Value (default), 2 = Std Error, 3 = Test Score, 4 = P-Value, 5 = Upper Value, 6 = Lower Value).
| ||||||||||||||
[in] | ParamIndex | (Required) is a switch to designate the target parameter (0 = intercept (default), 1 = first variable, 2 = 2nd variable, etc.). | ||||||||||||||
[out] | retVal | (Required) is a pointer to a variable to hold the calculated value. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_EMPTY_TIME_SERIES | (see remarks) |
NDK_FAILED | failed |
nSize
is zero, the function will fail and return NDK_INVALID_ARG.pData
argument is NULL, the function will fails and return NDK_INVALID_ARG.nSixe
argument with the number of non-missing values in the array. Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll |
int __stdcall NDK_MLR_PRFTest | ( | double ** | pXData, |
size_t | nXSize, | ||
size_t | nXVars, | ||
double * | pYData, | ||
size_t | nYSize, | ||
double | intercept, | ||
LPBYTE | mask1, | ||
size_t | nMaskLen1, | ||
LPBYTE | mask2, | ||
size_t | nMaskLen2, | ||
double | alpha, | ||
WORD | nRetType, | ||
double * | retVal ) |
Calculates the p-value and related statistics of the partial f-test (used for testing the inclusion/exclusion variables).
[in] | pXData | (Required) is the independent (explanatory) variables data matrix, such that each column represents one variable. | ||||||||
[in] | nXSize | (Required) is the number of observations in pXData . | ||||||||
[in] | nXVars | (Required) is the number of independent (explanatory) variables (columns) in pXData . | ||||||||
[in] | pYData | (Required) is the response or the dependent variable data array (one dimensional array of cells). | ||||||||
[in] | nYSize | (Required) is the number of observations in pYData . | ||||||||
[in] | intercept | (Required) is the constant or the intercept value to fix (e.g., zero). If missing (i.e., NaN), an intercept will not be fixed and is computed typically. | ||||||||
[in] | mask1 | (Required) is the boolean array to choose the explanatory variables in model 1. If missing, all variables in X are included. | ||||||||
[in] | nMaskLen1 | (Required) is the number of elements in the mask1 . | ||||||||
[in] | mask2 | (Required) is the boolean array to choose the explanatory variables in model 2. If missing, all variables in X are included. | ||||||||
[in] | nMaskLen2 | (Required) is the number of elements in the mask2 . | ||||||||
[in] | alpha | (Required) is the statistical significance or confidence level (i.e. alpha). If missing or omitted, an alpha value of 5% is assumed. | ||||||||
[in] | nRetType | (Required) is a switch to select the return output (1 = Mean Value (default), 2 = Std Error, 3 = Test Score, 4 = P-Value, 5 = Upper Value, 6 = Lower Value).
| ||||||||
[out] | retVal | (Required) is a pointer to a variable to hold the calculated test statistics. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_EMPTY_TIME_SERIES | (see remarks) |
NDK_FAILED | failed |
nSize
is zero, the function will fail and return NDK_INVALID_ARG.pData
argument is NULL, the function will fails and return NDK_INVALID_ARG.nSixe
argument with the number of non-missing values in the array. Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll |
int __stdcall NDK_MLR_STEPWISE | ( | double ** | pXData, |
size_t | nXSize, | ||
size_t | nXVars, | ||
LPBYTE | mask, | ||
size_t | nMaskLen, | ||
double * | pYData, | ||
size_t | nYSize, | ||
double | intercept, | ||
double | alpha, | ||
WORD | nMode ) |
Returns a list of the selected variables after performing the stepwise regression.
[in] | pXData | (Required) is the independent (explanatory) variables data matrix, such that each column represents one variable. | ||||||||
[in] | nXSize | (Required) is the number of observations in pXData . | ||||||||
[in] | nXVars | (Required) is the number of independent (explanatory) variables (columns) in pXData . | ||||||||
[in,out] | mask | (Required) is the boolean array to choose the explanatory variables in the model. If missing, all variables in X are included. | ||||||||
[in] | nMaskLen | (Required) is the number of elements in the mask . | ||||||||
[in] | pYData | (Required) is the response or the dependent variable data array (one dimensional array of cells). | ||||||||
[in] | nYSize | (Required) is the number of observations in pYData . | ||||||||
[in] | intercept | (Required) is the constant or the intercept value to fix (e.g., zero). If missing (i.e., NaN), an intercept will not be fixed and is computed typically. | ||||||||
[in] | alpha | (Required) is the statistical significance or confidence level (i.e. alpha). If missing or omitted, an alpha value of 5% is assumed. | ||||||||
[in] | nMode | (Required) is a switch to select the return output (1 = Mean Value (default), 2 = Std Error, 3 = Test Score, 4 = P-Value, 5 = Upper Value, 6 = Lower Value).
|
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_EMPTY_TIME_SERIES | (see remarks) |
NDK_FAILED | failed |
nSize
is zero, the function will fail and return NDK_INVALID_ARG.pData
argument is NULL, the function will fails and return NDK_INVALID_ARG.nSixe
argument with the number of non-missing values in the array. Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll |
int __stdcall NDK_SLR_ANOVA | ( | double * | pXData, |
size_t | nXSize, | ||
double * | pYData, | ||
size_t | nYSize, | ||
double | intercept, | ||
WORD | nRetType, | ||
double * | retVal ) |
Calculates the regression model analysis of the variance (ANOVA) values.
[in] | pXData | (Required) is the independent (aka explanatory or predictor) variable data array (a one-dimensional array). | ||||||||||||||||
[in] | nXSize | (Required) is the number of observations in pXData . | ||||||||||||||||
[in] | pYData | (Required) is the response or the dependent variable data array (a one-dimensional array). | ||||||||||||||||
[in] | nYSize | (Required) is the number of observations in pYData . | ||||||||||||||||
[in] | intercept | (Required) is the constant or the intercept value to fix (e.g., zero). If missing (i.e., NaN), an intercept will not be fixed and is computed typically. | ||||||||||||||||
[in] | nRetType | (Required) is a switch to select the output (1 = SSR (default), 2 = SSE, 3 = SST, 4 = MSR, 5 = MSE, 6 = F-Stat, 7 = Significance F).
| ||||||||||||||||
[out] | retVal | (Required) is a pointer to a variable to hold the calculated value. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_EMPTY_TIME_SERIES | (see remarks) |
NDK_FAILED | failed |
nSize
is zero, the function will fail and return NDK_INVALID_ARG.pData
argument is NULL, the function will fails and return NDK_INVALID_ARG.nSixe
argument with the number of non-missing values in the array. Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll |
int __stdcall NDK_SLR_FITTED | ( | double * | pXData, |
size_t | nXSize, | ||
double * | pYData, | ||
size_t | nYSize, | ||
double | intercept, | ||
WORD | nRetType ) |
Returns an array of cells for the conditional mean (or residuals) fitted values.
[in,out] | pXData | (Required) is the independent (aka explanatory or predictor) variable data array (a one-dimensional array). | ||||||||||||
[in] | nXSize | (Required) is the number of observations in pXData . | ||||||||||||
[in] | pYData | (Required) is the response or the dependent variable data array (a one-dimensional array). | ||||||||||||
[in] | nYSize | (Required) is the number of observations in pYData . | ||||||||||||
[in] | intercept | (Required) is the constant or the intercept value to fix (e.g., zero). If missing, an intercept will not be fixed and is computed typically. | ||||||||||||
[in] | nRetType | (Required) is a switch to select the return output (1 = fitted values (default), 2 = residuals, 3 = std. residuals, 4 = X (cleaned), 5 = Y (cleaned)).
|
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_EMPTY_TIME_SERIES | (see remarks) |
NDK_FAILED | failed |
nSize
is zero, the function will fail and return NDK_INVALID_ARG.pData
argument is NULL, the function will fails and return NDK_INVALID_ARG.nSixe
argument with the number of non-missing values in the array. Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll |
int __stdcall NDK_SLR_FORE | ( | double * | pXData, |
size_t | nXSize, | ||
double * | pYData, | ||
size_t | nYSize, | ||
double | intercept, | ||
double | target, | ||
double | alpha, | ||
WORD | nRetType, | ||
double * | retVal ) |
Calculates the NDK_SLR_FORE
[in] | pXData | (Required) is the independent (aka explanatory or predictor) variable data array (a one-dimensional array). | ||||||||||
[in] | nXSize | (Required) is the number of observations in pXData . | ||||||||||
[in] | pYData | (Required) is the response or the dependent variable data array (a one-dimensional array). | ||||||||||
[in] | nYSize | (Required) is the number of observations in pYData . | ||||||||||
[in] | intercept | (Required) is the constant or the intercept value to fix (e.g., zero). If missing, an intercept will not be fixed and is computed typically. | ||||||||||
[in] | target | (Required) is the statistical significance or confidence level (i.e. alpha). If missing or omitted, an alpha value of 5% is assumed. | ||||||||||
[in] | alpha | (Required) is the statistical significance or confidence level (i.e. alpha). If missing or omitted, an alpha value of 5% is assumed. | ||||||||||
[in] | nRetType | (Required) is a switch to select the return output (1 = Mean Value (default), 2 = Std Error, 3 = Test Score, 4 = P-Value, 5 = Upper Value, 6 = Lower Value).
| ||||||||||
[out] | retVal | (Required) is a pointer to a variable to hold the calculated value. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_EMPTY_TIME_SERIES | (see remarks) |
NDK_FAILED | failed |
nSize
is zero, the function will fail and return NDK_INVALID_ARG.pData
argument is NULL, the function will fails and return NDK_INVALID_ARG.nSixe
argument with the number of non-missing values in the array. Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll |
int __stdcall NDK_SLR_GOF | ( | double * | pXData, |
size_t | nXSize, | ||
double * | pYData, | ||
size_t | nYSize, | ||
double | intercept, | ||
WORD | nRetType, | ||
double * | retVal ) |
Calculates a measure for the goodness of fit (e.g., LLF, R^2, etc.).
[in] | pXData | (Required) is the independent (aka explanatory or predictor) variable data array (a one-dimensional array). | ||||||||||||||
[in] | nXSize | (Required) is the number of observations in pXData . | ||||||||||||||
[in] | pYData | (Required) is the response or the dependent variable data array (a one-dimensional array). | ||||||||||||||
[in] | nYSize | (Required) is the number of observations in pYData . | ||||||||||||||
[in] | intercept | (Required) is the constant or the intercept value to fix (e.g., zero). If missing (i.e., NaN), an intercept will not be fixed and is computed typically. | ||||||||||||||
[in] | nRetType | (Required) is a switch to select the return output (1 = R-Square (default), 2 = Adj. R-Square, 3 = RMSE, 4 = LLF, 5 = AIC, 6 = SIC/BIC)..
| ||||||||||||||
[out] | retVal | (Required) is a pointer to a variable to hold the calculated value. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_EMPTY_TIME_SERIES | (see remarks) |
NDK_FAILED | failed |
nSize
is zero, the function will fail and return NDK_INVALID_ARG.pData
argument is NULL, the function will fails and return NDK_INVALID_ARG.nSixe
argument with the number of non-missing values in the array. Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll |
int __stdcall NDK_SLR_PARAM | ( | double * | pXData, |
size_t | nXSize, | ||
double * | pYData, | ||
size_t | nYSize, | ||
double | intercept, | ||
double | alpha, | ||
WORD | nRetType, | ||
WORD | ParamIndex, | ||
double * | retVal ) |
Calculates the OLS regression coefficient values.
[in] | pXData | (Required) is the independent (aka explanatory or predictor) variable data array (a one-dimensional array). | ||||||||||||||
[in] | nXSize | (Required) is the number of observations in pXData . | ||||||||||||||
[in] | pYData | (Required) is the response or the dependent variable data array (a one-dimensional array). | ||||||||||||||
[in] | nYSize | (Required) is the number of observations in pYData . | ||||||||||||||
[in] | intercept | (Required) is the constant or the intercept value to fix (e.g., zero). If missing, an intercept will not be fixed and is computed typically. | ||||||||||||||
[in] | alpha | (Required) is the statistical significance or confidence level (i.e. alpha). If missing or omitted, an alpha value of 5% is assumed. | ||||||||||||||
[in] | nRetType | (Required) is a switch to select the return output (1 = Mean Value (default), 2 = Std Error, 3 = Test Score, 4 = P-Value, 5 = Upper Value, 6 = Lower Value).
| ||||||||||||||
[in] | ParamIndex | (Required) is a switch to designate the target parameter (0 = Intercept (default), 1 = Explanatory Variable).
| ||||||||||||||
[out] | retVal | (Required) is a pointer to an array-typed variable to hold the calculated value. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_EMPTY_TIME_SERIES | (see remarks) |
NDK_FAILED | failed |
nSize
is zero, the function will fail and return NDK_INVALID_ARG.pData
argument is NULL, the function will fails and return NDK_INVALID_ARG.nSixe
argument with the number of non-missing values in the array. Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll |