Offers the ability to fit a linear regression model in accordance with the least squares approach and then measure its goodness-of-fit.
For a list of all members of this type, see GeneralLinear Members.
System.Object
GeneralLinear
The regression model is constructed from the linear combination of a collection of basis elements (i.e. functions), where the basis elements are set using the method SetFunctionBasis. This approach allows complete flexibility over the functions which are used as basis elements within the linear regression model.
The Regression model is a collection of functions from which the function of best-fit will be selected.
The collection of functions within the Regression model is constructed from a linear combination of basis
functions f1(x), f2(x),..., fn(x), where the basis functions
are set using SetFunctionBasis. Therefore, the function of best fit which is selected from the
regression model in accordance with the least squares approach can be any function which takes the form:
a1 * f1(x) + a2 * f2(x) + ... + an * fn(x),
where a1,...,an are any real numbers. The equation given above of often
referred to as the regression model.
When we refer to the function of best fit strictly speaking we are referring to the function constructed as a linear combination of basis functions constructed by the following means. The coefficients are selected such that the resulting function has the maximum likelihood of being the best fit in accordance with the least squares approach when the measurement errors of the y-axis coordinates of the known data points are given.
Within this implementation we offer the ability to incorporate measurement errors of the experimental data to
which the function is fitted. In particular, we assume that the measurement errors of the yi's
are independently random and distributed as a Normal Gaussian distribution about a true value. It follows
from these assumptions (though not rigorously) that the most likely coefficients which generate the best fit
are achieved by finding the coefficients: a1, ..., an such that the sum of
the squares of the terms:
( yi - (a1 * f1(xi) + ... + an * fn(xi)) / sigmai,
is minimized where we sum over the i, for 1 <= i <= m; where m
is the number of data points, namely (xi, yi); f1,...,fn
are the function basis elements and the sigmai of the standard deviation of the measurement
error of the values of yi.
Remarks:
1.0.
sigmai corresponds the weight applied to the i-th data point.
In order to apply this class you must perform the following steps:
Once the function has been fit you are able to 'read' the following quantitative information about the fitted function:
ANOVA is an abbreviation for the Analysis of the Variance. This analysis provides information on the structure of
the variability of the regression model which form the basis of many tests of the significance of a model. Note that
in order to be able to perform this statistical testing we make certain assumptions about the errors associated with
each of the data points within the regression model (Y = F(X,a[]) + error), namely:
Though from a theoretical point on view it is necessary to make these assumptions in many practical instances these assumptions will just not hold. Therefore, the user should take this into account when ever apply ANOVA type analysis to real world situations. The order to see the degree to which these assumptions are met a scatter plot of the residuals (evaluated using GetResiduals) of the regression model should be considered. The scatter plot will also provide a quick means by which you are able to discover whether the particular regression model considered was a good choice. If the considered model is deemed not to have been a good choice then further visual inspection of the scatter plot with in most cases suggest possible refinements of the original model considered.
Within a scatter plot of the residuals of a regression model you should observe the following:
x). In practical, you will often find that as the
model's (space) variable increases the level of dispersion increase, that is, the variance increases.
Within this class once the regression model has been fitted you are able to evaluate the following ANOVA type measures:
Namespace: WebCab.Libraries.Statistics.CurveFitting
Assembly: WebCab.DelphiLibraries.Statistics (in WebCab.DelphiLibraries.Statistics.dll)
GeneralLinear Members | WebCab.Libraries.Statistics.CurveFitting Namespace