next up previous contents index
Next: LN Up: A Function Reference Previous: LINFIT

LLS

 

Syntax: @LLS(A, Y)

A = a range
Y = a range

@LLS generates:

  1. the linear least squares solution, X, to the overdetermined system of equations AX=Y

  2. the standard errors of the least square estimates of each element of the parameter vector X, the T-statistics that compare each parameter to zero, and the significance level of each.

  3. the variance of the model, the R-squared correlation for the model, and its corresponding T-statistic and significance level. (Note: These values are only valid if A contains a column of 1's, which corresponds to the y-intercept. Omitting the column of 1's is equivalent to forcing the y-intercept of the model to be equal to zero.)

If any columns of A are linearly dependent, the function produces an error.

The output of @LLS is a a table with four rows and n+1 columns, where n is the number of independent variables in the model (i.e., the number of columns in the A matrix). The table is presented in the following format:

displaymath16186

where

tex2html_wrap_inline16188 = the least squares estimate of the ith coefficient, corresponding to the independent variable in the ith column of A.
tex2html_wrap_inline16190 = the standard error of tex2html_wrap_inline16188 .
tex2html_wrap_inline16194 = the t-statistic for testing whether tex2html_wrap_inline16196 is significantly different from zero.
tex2html_wrap_inline16198 = the probability of error in rejecting the null hypothesis that tex2html_wrap_inline16200 , based on two-sided t-test.
tex2html_wrap_inline16202 = the mean squared error of the model.
MSE = the model coefficient of determination (the square of the model correlation coefficient, R).
tex2html_wrap_inline16204 = the t-statistic for testing whether R is significantly different from zero.
tex2html_wrap_inline16208 = the probability of error in rejecting the null hypothesis that R=0, based on a two-sided t-test.

Examples:

Matrix D3..E5 =

D E
3 1 3
4 2 4
5 7 4

Matrix G3..G5 =

G
3 9
4 5
5 4

@LLS(D3..E5, G3..G5) =
-0.76479076 2.2640693 15.308802
0.9516909 1.0921967 0.54349619
-0.80361256 2.0729501 0.49703082
0.56904671 0.2861429 0.60906673

@LLS(A1..A2, B1..C2) = Error - @LLS, improper dimensions


next up previous contents index
Next: LN Up: A Function Reference Previous: LINFIT

NExS User's Guide, Version 1.4.5
Grey Trout Software
11 April 1999