HP -15C Advanced Functions Handbook page 135

Hide thumbs Also See for HP-15C:
Table of Contents

Advertisement

Section 4: Using Matrix Operations
133
degrees of freedom; otherwise, accept the hypothesis.
The following program fits the linear model to a set of n data points
Xn, x
i2
, • ••, %ip, Vi by the method of least-squares. The parameters 6
1;
6
2
, ..., b
p
are estimated by the solution 6 to the normal equations
X
T
Xb = X
T
y. The program also estimates a
2
and the parameter
covariance matrix Cov(b). The regression and residual sums of
squares (Reg SS and Res SS) and the residuals are also calculated.
The program requires two matrices:
Matrix A: n X p with row i (:c
;1
, x
i2
, • ••, x
ip
)
fori — 1, 2,..., n.
Matrix B: n X 1 with element i (y,) for i = I , 2,..., n.
The program output is:
Matrix A: unchanged.
Matrix B: n X 1 containing the residuals from^the fit
(yi - biXti — ... — b
p
x
ip
) for i = 1, 2,..., n, where 6, is the
estimate for 6
£
.
Matrix C: p X p covariance matrix of the parameter
estimates.
Matrix D: p X 1 containing the parameter estimates 6
1(
...,
b
p
.
T-register: contains an estimate of a
2
.
Y-register: contains the regression sum of squares
(RegSS).
X-register: contains the residual sum of squares (Res SS).
The analysis of variance (ANOVA) table below partitions the total
sum of squares (Tot SS) into the regression and the residual sums
of squares. You can use the table to calculate the F ratio.
ANOVA Table
Source
Regression
Residual
Total
Degrees of
Freedom
P
n
p
n
Sum of
Squares
RegSS
FtesSS
TotSS
Mean
Square
(RegSS)
P
(ResSS)
(n-p)
F Ratio
(Reg MS)
(Res MS)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents