c_steplr - Computes transformation coefficients using a stepwise regression procedure

SYNTAX

#include "geompak.h"

FUNCTION c_steplr (npts, indep, data, coefs, alpha)

     long                      *npts;
     long                      *indep;
     double                    (*data)[MAX_COEF];
     double                    *coefs;
     double                    *alpha;

PARAMETERS

npts (input, long)

The number of data records in the data array.

indep (input, long)

The number of independent variables in the data array.

data (input, double)

An array containing the data records to be used in the regression. This double dimensioned array contains the independent and dependent variables. The dimensions of this array are the number of points entered by MAX_COEF. One column of independent variables is given for each polynomial term desired in coefs. The maximum number of independent variables is 15.

coefs (output, double)

Array containing polynomial coefficients calculated by c_steplr(). The dimension of this array should be at least one more than the number of independent variables entered (indep).

alpha (input, double)

An array dimensioned to two containing the entry and exit statistical significance test values. These values must be greater than zero and less than one.

DESCRIPTION

c_steplr() computes transformation coefficients using a stepwise regression procedure. c_steplr() is called twice to compute transformation coefficients for a bivariate polynomial. A statistical significance test allows the omission of variables which do not significantly contribute to the model. Values of 0.1, 0.05 and 0.01 are commonly used for alpha. An alpha of 0.999 will allow variables to enter and remain in the model which do not significantly contribute to the model, approximating a common least squares fit. The maximum number of data records is 1024, the minimum number of data records needed to obtain a fit is 3.

The algorithm for c_steplr() is modeled after Draper & Smith's Applied Regression Analysis, Section 6.8, entitled "Computational Method for Stepwise Regression." This stepwise procedure was originated by Efroymson.

RETURN VALUE

c_steplr() returns

     E_SUCC (0)  --> successful completion
     E_FAIL (-1) --> operation failed

SPECIAL CONSIDERATIONS:

The c_steplr() call is for C only.