HP 15c User Manual

Page 113

Advertising
background image

Section 4: Using Matrix Operations

113

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

Degrees of

Freedom

Sum of Squares Mean Square

F Ratio

Regression

p

Reg SS

p

)

(

SS

Reg

)

(

)

(

MS

Res

MS

Reg

Residual

n

p

Res SS

)

(

)

(

p

n

SS

Reg

Total

n

Tot SS

The program calculates the regression sum of squares unadjusted for the mean because a
constant term may not be in the model. To include a constant term, include in the model a
variable that is identically equal to one. The corresponding parameter is then the constant
term.

To calculate the mean-adjusted regression sum of squares for a model containing a constant
term, first use the program to fit the model and to find the unadjusted regression sum of
squares. Then fit the simpler model y = b

1

+ r by dropping all variables but the one

identically equal to one (b

1

for example) and find the regression sum of squares for this

model, (Reg SS)

C

. The mean adjusted regression sum of squares (Reg SS)

A

= Reg SS − (Reg

SS)

C

. Then the ANOVA table becomes:

ANOVA Table

Source

Degrees of

Freedom

Sum of Squares

Mean Square

F Ratio

Regression

Constant

p

− 1

(Reg SS)

A

p

A

SS

Reg

)

(

)

(

)

(

MS

Res

MS

Reg

A

Constant

1

(Reg SS)

C

(Res SS)

C

Residual

n

p

Res SS

)

(

)

(

p

n

SS

Reg

Total

n

Tot SS

You can then use the F ratio to test whether the full model fits data significantly better than
the simpler model y = b

1

+ r.

You may want to perform a series of regressions, dropping independent variables between
each. To do this, order the variables in the reverse order that they will be dropped from the
model. They can be dropped by transposing the matrix A, redimensioning A to have fewer
rows, and then transposing A once again.

Advertising