LOGREG

LOGREG the logarithmic regression

Synopsis

LOGREG(known_ys,known_xs,affine,stat)

Arguments

known_ys: known y-values

known_xs: known x-values; defaults to the array {1, 2, 3, …}

affine: if true, the model contains a constant term, defaults to true

stat: if true, extra statistical information will be returned; defaults to FALSE

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. LOGREG returns an array having two columns and one row. m is given in the first column and b in the second.

Any extra statistical information is written below m and b in the result array. This extra statistical information consists of four rows of data: In the first row the standard error values for the coefficients m, b are given. 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.

Note

If known_ys and known_xs have unequal number of data points, this function returns a #NUM! error.

See also

LOGFIT, LINEST, LOGEST.