| | | This function always returns an array. |
| | | This function must be entered as an array formula. |
| | | Calculates the statistics for a line by using the "least squares" method to calculate a straight line that best fits your data, and returns an array that describes the line. |
| | | If "known_y's" is in a single column, then each column of "known_x's" is interpreted as a separate variable. |
| | | If "known_y's" is in a single row, then each row of "known_x's" is interpreted as a separate variable. |
| | | The "known_x's" can include one or more sets of variables. |
| | | If "known_x's" is left blank, it is assumed to be the array {1,2,3,...} that is the same size as "known_y's". |
| | | If "const" = True, then b is calculated normally. |
| | | If "const" = False, then b = 0 and the equation (y = mx) is used. |
| | | If "const" is left blank, then True is used. |
| | | If "stats" = True, then additional regression statistics are returned (i.e. the array is {mn,mn-1,...,m1,b;sen,sen-1,...,se1,seb;r2,sey;F,df;ssreg,ssresid} ). |
| | | If "stats" = False, then only the m-coefficients and the constant b are returned. |
| | | If "stats" is left blank, then False is used. |
| | | If only one variable is used, "known_y's" and "known_x's" can be ranges of any shape, as long as they have equal dimensions. |
| | | If more than one variable is used, "known_y's" must be a vector (that is, a range with a height of one row or a width of one column). |
| | | The accuracy of this function was improved in Excel 2003. For more information please refer to this Knowledge Base Article (828533). |
| | | For a working example please refer to the LINEST Function page. |