2.9 Constrained Multiple Regression (Pro)

Summary

The app Constrained Multiple Regression is used to perform constrained multiple regression and solve constrained linear least-squares problems.

Tutorial

  1. Start this tutorial with the app Constrained Multiple Regression installed. If you have not installed this app, please click Add Apps button in Apps Gallery to open App Center to search and install the app.
    Constrained Multiple Regression 00.jpg
  2. With a new worksheet, select Data>Connect To File: Text/CSV to import the sample file "<Origin Program Folder>\Samples\Curve Fitting\Multiple Linear Regression.dat" into the worksheet with the default import settings.
    Constrained Multiple Regression 01.jpg
  3. Click the app icon Constrained Multiple Regression in App Gallery to open the app dialog. Select col(D) as Dependent Data and col(A)~col(C) as Independent Data.
    Constrained Multiple Regression 02.jpg
  4. Now, we are going to specify the bounds and linear constraints:
    • Expand the branch Bounds, click the check box Same for All Bounds to set same bound for all parameters. Enter -0.5 for Lower Bound and 2.5 for Upper Bound.
    • Expand the branch General Linear Constraints, set Number of Constraints to 1; in the Constraints No.1 sub-branch, enter the expression 0.5*a0+3*a1-0.9*a2+1.5*a3 into Constraints Expression and set 6 for the following Upper Bound.
    Constrained Multiple Regression 03.jpg
  5. Click OK button to perfrom the regression. You will get a report sheet "CMR1" and a result sheet "CMRCurve1".
    Constrained Multiple Regression 04.jpg

Dialog Settings

Input Data

Specify datasets for constrained multiple regression, including one dependent data, and multiple independent data.

Bounds

Specify bounds for each parameter. The number of parameters will be the number of independents plus 1. If no independent data specified, this branch will be hidden. For each parameter, you can specify Lower Bound and Upper Bound, which by default are <Optional>, which means negative infinity and positive infinity respectively. If all bounds are the same, just check Same for All Bounds to specify the corresponding values.

General Linear Constraints

Specify the linear constraints for the least-squares problems.

Number of Constraints Specify how many linear constraints.
Constraint No.# Setting for each constraint. For each constraint, the expression looks like: l <= a0*x0 + a1*x1 + a2*x2 + ... <= u, where l is lower bound, u is upper bound, and a0*x0 + a1*x1 + a2*x2 + ... is the constraint expression.
  • Constraint Expression
    Specify the constraint expression, which will be the form mentioned above, such as 0.5*a0+3*a1-0.9*a2+1.5*a3.
  • Lower Bound for Constraint
    Specify the lower bound of the constraint. By default, it is <Optional> for negative infinity.
  • Upper Bound for Constraint
    Specify the upper bound of the constraint. By default, it is <Optional> for positive infinity.

Quantities to Compute

Please refer to Multiple Linear Regression's Quantities to Compute.

Plots

Please refer to Multiple Linear Regression's Plots.

Algorithm

This tool solves linearly constrained linear least-squares problems by using the NAG function, e04ncc (nag_opt_lin_lsq). And the calculations for other quantities are using the same algorithm as Multiple Regression Results.