Difference between revisions of "Documentation/How Tos/Calc: LOGEST function"
From Apache OpenOffice Wiki
< Documentation | How Tos
m |
m |
||
Line 55: | Line 55: | ||
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} | * [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} | ||
[[Category: Documentation/Reference/Calc/Array functions]] | [[Category: Documentation/Reference/Calc/Array functions]] | ||
+ | [[Category: Documentation/Reference/Calc/Statistical functions]] |
Revision as of 12:43, 17 May 2010
LOGEST
Returns a table of statistics for an exponential curve that best fits a data set.
Syntax:
LOGEST(yvalues; xvalues; allow_const; stats)
- yvalues is a single row or column range specifying the y coordinates in a set of data points.
- xvalues is a corresponding single row or column range specifying the x coordinates. If xvalues is omitted it defaults to 1, 2, 3, ..., n. If there is more than one set of x variables, xvalues may be a range with corresponding multiple rows or columns.
- LOGEST finds an exponential curve y = a . b^{x} that best fits the data. With more than one set of variables the curve is of the form y = a . b_{1}^{x1} . b_{2}^{x2} ... . b_{n}^{xn}.
- In order to fit the curve, LOGEST uses linear regression (the "least squares" method) based on the equation ln(y) = ln(a) + x_{1}ln(b_{1}) + x_{2}ln(b_{2}) + ... x_{n}ln(b_{n}).
- if allow_const is FALSE the constant a is forced to be one; y = b^{x}. If omitted, allow_const defaults to TRUE (a value for a is found).
- LOGEST returns a table (array) of statistics as below and must be entered as an array formula (for example by using Cntrl-Shift-Enter rather than just Enter)
- If stats is omitted or FALSE only the top line of the statistics table is returned. If TRUE the entire table is returned. The statistics relate to the equation for ln(y) given above.
- b_{1} to b_{n} and a are the coeficients for the equation above.
- σ_{1} to σ_{n} are the standard error values for the ln(b) values; σ_{a} is the standard error value for the ln(a) value.
- r^{2} is the determination coefficient (RSQ); σ_{y} is the standard error value for the ln(y) estimate.
- F is the F statistic (F-observed value); df is the number of degrees of freedom.
- ss_{reg} is the regression sum of squares; ss_{resid} is the residual sum of squares.
Example:
- In the example above, cells A2:B6 contain the x,y values for a set of points. LOGEST(B2:B6;A2:A6;1;1) returns the statistics for a best fit exponential curve through those points.
Issues:
- You need a good understanding of the statistics involved.
- Any empty cells in the output array show #N/A (in Calc and Excel).