Next: LN Up: A. Function Reference Previous: LINFIT   Contents   Index

# 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:

where

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

Examples:

Matrix D3..E5 =

3 4 5 D E 1 3 2 4 7 4

Matrix G3..G5 =

3 4 G 9 5 4

LLS(D3..E5, G3..G5) =
 -0.764791 2.26407 15.3088 0.951691 1.0922 0.543496 -0.803613 2.07295 0.497031 0.569047 0.286143 0.609067

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

Excel function: N/A

Next: LN Up: A. Function Reference Previous: LINFIT   Contents   Index
SpreadScript User's Guide, Version 1.2
Grey Trout Software
02 March 2003