Linest

Syntax

Linest(KnownYs, KnownXs, HasConstant, ReturnStatistics)

Parameters

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:

ReturnStatistics. A logical argument that determines whether additional regression statistics should be returned:

Description

The method calculates series statistics using the least squares method to calculate the straight line that approximates available data in the best way.

Comments

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:

Function Wizard | Statistical Functions