The @REGRESS function is used to perform multiple linear regression, a technique that models the linear relationship, Y = b0 + B*X, between one dependent variable and one or more independent variables The syntax for @REGRESS is:
B, b0, RES, rsq, f, p, var = @REGRESS( Y, X);
where,
• | B The vector of coefficient terms for the regression. If there are p independent variables, then B is a vector of length p. |
• | b0 The constant term of the regression. If a constant term is not desired, then you can omit this argument and LINGO will force the constant term to 0. |
• | RES The residuals, or error terms. These are the differences between the predicted and actual observed values for the dependent variable. |
• | rsq The R-squared statistic, a measure of strength of the relationship between the model and dependent variable. The fraction of the original variance removed by the forecast formula. |
• | f The F-value, a measure of the overall significance of the model. |
• | p The p-value for the regression, a measure of the significance of the F-test. |
• | var Estimate of variance of the residual terms. |
• | Y The observed values for the dependent variable. If there are n observations, then Y should be a vector of length n. |
• | X The independent variable values. If there are n observations and p independent variables, then X should be an nxp matrix.. |
All matrices must be dense and cannot be defined on sparse sets, and @REGRESS may only be used in a model's calc section.
As long as at least one left-hand side argument is present, all other arguments may be omitted. If err is present, then LINGO will not halt the run if a numeric error occurs; it will be up to your model to handle the error. If err is not present and a numeric error occurs, then LINGO will halt model execution.
For more information, refer to the section Matrix Functions.