NLREG -- Nonlinear Regression and Curve Fitting
NLREG is a powerful statistical analysis program that performs linear and
nonlinear regression analysis, surface and curve fitting.
NLREG determines the values of parameters
for an equation, whose form you specify, that cause the equation to best
fit a set of data values. NLREG can handle linear, polynomial, exponential,
logistic, periodic, and general nonlinear functions. Unlike many "nonlinear"
regression programs that can only handle a limited set of function forms,
NLREG can handle essentially any function whose form you can specify
NLREG features a full programming language with
a syntax similar to C for specifying the function that is to be fitted to
the data. This allows you to compute intermediate work variables, use
conditionals, and even iterate in loops. With NLREG it is easy to
construct piecewise functions that change form
over different domains.
Since the NLREG language includes arrays,
you can even use tabular look-up methods to define the function.
Here is an example of an NLREG program for fitting a damped sine wave
to some data:
Title "Damped pendulum motion";
Function X = A*exp(-alpha*Time)*sin(w*(Time-Phase))+offset;
[ data goes here ]
NLREG performs true nonlinear regression analysis and curve
fitting, it does not transform the function into a linear form. As a
result, it can handle functions that are impossible to linearize such as:
Y = Amplitude*sin(Freq*X+Phase) + Growth*exp(X) + Offset;
Where "Amplitude", "Freq", "Phase", "Growth", and "Offset" are parameters
whose values are to be determined by NLREG.
Another advantage of handing the function in true nonlinear form is that
the minimization of the sum of
squared residual values (i.e., "least squares") is based on the true
nonlinear value rather than some linearized transformation.
In addition to computing the optimal values of the parameters to best
fit the function to the data, NLREG
can generate plots of the data points and the
fitted equation. In addition,
it can plot the distribution of residual values and produce a normal
NLREG also computes auxiliary statistics such as Student"s t,
Prob(t), F, Prob(F), Durbin-Watson, and, optionally, correlation and covariance
The Standard version of NLREG
can fit up to 5 variables and parameters to the
The Advanced version can handle up to
2000 variables and parameters.
In addition, the Advanced version can generate
3D surface plots
such as shown here:
In addition to performing classic nonlinear regression, NLREG can be used
to find the root or minimum value of a
general multivariate, nonlinear function. It can
also be used in a special form where the independent variable is omitted;
an interesting application of this is "circular
regression" where a circle is fitted to a set of data points.
If you have data with categorical variables such as race, gender, marital status, malignant/benign, etc.,
you may want to use a Decision Tree to model your data.
Check out the DTREG Decision Tree Software.