The Gnumeric Manual
<<< Previous |  | Next >>>

# LINEST

## Name

LINEST --

## Synopsis

    LINEST(known_y's[,known_x's[,const[,stat]]])

## Description

LINEST function calculates the ``least squares'' line that best fit to your data in @known_y's. @known_x's contains the corresponding x's where y=mx+b.

If @known_x's is omitted, an array {1, 2, 3, ...} is used. LINEST returns an array having two columns and one row. The slope (m) of the regression line y=mx+b is given in the first column and the y-intercept (b) in the second.

If @known_y's and @known_x's have unequal number of data points, LINEST returns #NUM! error.

If @const is FALSE, the line will be forced to go through the origin, i.e., b will be zero. The default is TRUE.

If @stat is TRUE, extra statistical information will be returned. Extra statistical information is written bellow the regression line coefficients in the result array. Extra statistical information consists of four rows of data. In the first row the standard error values for the coefficients m1, (m2, ...), b are represented. The second row contains the square of R and the standard error for the y estimate. The third row contains the F-observed value and the degrees of freedom. The last row contains the regression sum of squares and the residual sum of squares.

The default of @stat is FALSE.

## Examples

## See also

LOGEST, TREND.

<<< Previous | Home | Next >>>
LEN | Up | LN