01.03.2013 Views

Applied Statistics Using SPSS, STATISTICA, MATLAB and R

Applied Statistics Using SPSS, STATISTICA, MATLAB and R

Applied Statistics Using SPSS, STATISTICA, MATLAB and R

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

7.2 Multiple Regression<br />

7.2.1 General Linear Regression Model<br />

7.2 Multiple Regression 289<br />

Assuming the existence of p − 1 predictor variables, the general linear regression<br />

model is the direct generalisation of 7.1:<br />

p<br />

i = β + β xi<br />

+ β xi<br />

+ + β p xi<br />

p + ε i = ∑ β k xik<br />

+<br />

k<br />

i<br />

−1<br />

0 1 1 2 2 K −1<br />

, −1<br />

= 0<br />

, 7.34<br />

Y ε<br />

with x 1.<br />

In the following we always consider normal regression models with<br />

i0<br />

=<br />

i.i.d. errors εi ~ N0,σ.<br />

Note that:<br />

– The general linear regression model implies that the observations are<br />

independent normal variables.<br />

– When the xi represent values of different predictor variables the model is<br />

called a first-order model, in which there are no interaction effects between<br />

the predictor variables.<br />

– The general linear regression model encompasses also qualitative predictors.<br />

For example:<br />

Y ε<br />

i = β 0 + β1x<br />

i1<br />

+ β 2 xi2<br />

+ i . 7.35<br />

xi1<br />

=<br />

x i2<br />

patient ’<br />

s<br />

⎧1<br />

= ⎨<br />

⎩0<br />

weight<br />

if patient female<br />

if patient male<br />

Patient is male: Yi = β 0 + β1x<br />

i1<br />

+ ε i .<br />

Patient is female: Yi = ( β 0 + β 2 ) + β1<br />

xi1<br />

+ ε i .<br />

Multiple linear regression can be performed with <strong>SPSS</strong>, <strong>STATISTICA</strong>,<br />

<strong>MATLAB</strong> <strong>and</strong> R with the same comm<strong>and</strong>s <strong>and</strong> functions listed in Comm<strong>and</strong>s 7.1.<br />

7.2.2 General Linear Regression in Matrix Terms<br />

In order to underst<strong>and</strong> the computations performed to fit the general linear<br />

regression model to the data, it is convenient to study the normal equations 7.3 in<br />

matrix form.<br />

We start by expressing the general linear model (generalisation of 7.1) in matrix<br />

terms as:<br />

y = Xβ + ε, 7.36

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!