The files included with this article contain the source code for the linear regression class, as well as an example program. This article presents a C# implementation of a weighted linear regression, using an efficient symmetric matrix inversion algorithm to overcome the problem of nonlinearity of the dependent variable and to compute the complete variance-covariance matrix to allow estimation of confidence intervals in the estimated regression coefficients. In addition, in many cases, it is not only necessary to compute the best formula to represent the data, but to also estimate the accuracy of the parameters. Unfortunately, there are many times when one knows that the dependent variable is not a linear function, but that a transformed variable might be. The applications of linear least squares and Gaussian elimination are well known techniques. For the case of linear least squares, the resulting analysis requires the solution of a set of simultaneous equations that can be easily solved using Gaussian Elimination. Normally, the regression problem is formulated as a least squares minimization problem. For linear regression, the independent variable (data) is assumed to be a linear function of various independent variables. Linear regression is a useful technique for representing observed data by a mathematical equation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |