Linest(KnownYs, KnownXs, HasConstant, ReturnStatistics)
KnownYs. The set of y values that are already known for the ratio y = m*x+b. The values must be greater than zero.
KnownXs. The set of x values that are already known for the ratio y = m*x+b.
HasConstant. Boolean value that indicates whether the b constant must be equal to zero:
True. The b constant is calculated in a standard way.
False. The b constant is supposed to be equal to 0 and the m values are adjusted to ensure execution of the equality: y = mx.
ReturnStatistics. A logical argument that determines whether additional regression statistics should be returned:
True. The Linest function returns additional regressive statistics.
False. The Linest function returns only the m coefficients and the b constant.
The method calculates series statistics using the least squares method to calculate the straight line that approximates available data in the best way.
The function returns an array, which describes the resulting line.
If there is only one column in the KnownYs array, each column of the KnownXs array is regarded as a separate variable. If there is only one row in the KnownYs array, each row of the KnownXs array is regarded as a separate variable.
The KnownXs array can contain one or more variable sets. If only one variable is used, KnownYs and KnownXs can have any form, provided that they have the same dimension. If several variables are used, KnownYs must be a vector (that is, an interval with a row height or a column width).
See also: