LOGREG

LOGREG

Synopsis

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

Description

LOGREG function transforms your x's to z=ln(x) and applies the ``least squares'' method to fit the linear equation

y = m * z + b

to your y's and z's --- equivalent to fitting the equation

y = m * ln(x) + b

to y's and x's.

If known_x's is omitted, an array {1, 2, 3, ...} is used. LOGREG returns an array having two columns and one row. m is given in the first column and b in the second.

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

If const is FALSE, the curve will be forced to go through [1; 0], i.e., b will be zero. The default is TRUE.

If stat is TRUE, extra statistical information will be returned which applies to the state AFTER transformation to z. Extra statistical information is written below m and b in the result array. Extra statistical information consists of four rows of data. In the first row the standard error values for the coefficients m, 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

LOGFIT, LINEST, LOGEST.