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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The Yi can also be linearly modelled as:<br />

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

i1<br />

+ β 2u<br />

i2<br />

+ i with<br />

Y ε<br />

7.2 Multiple Regression 301<br />

2<br />

i1<br />

xi<br />

; ui<br />

2 xi<br />

u = = .<br />

As a matter of fact, many complex dependency models can be transformed into<br />

the general linear model after suitable transformation of the variables. The general<br />

linear model encompasses also the interaction effects, as in the following example:<br />

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

i1<br />

+ β 2 xi2<br />

+ β 3 xi1x<br />

i2<br />

+ i , 7.47<br />

Y ε<br />

which can be transformed into the linear model, using the extra<br />

variable x i3<br />

= xi1x<br />

i2<br />

for the cross-term x i1x i2<br />

.<br />

Frequently, when dealing with polynomial models, the predictor variables are<br />

previously centred, replacing xi by xi − x . The reason is that, for instance, X <strong>and</strong><br />

X 2 will often be highly correlated. <strong>Using</strong> centred variables reduces multicollinearity<br />

<strong>and</strong> tends to avoid computational difficulties.<br />

Note that in all the previous examples, the model is linear in the parameters βk.<br />

When this condition is not satisfied, we are dealing with a non-linear model, as in<br />

the following example of the so-called exponential regression:<br />

Y = β ) + ε<br />

i<br />

0 exp( β1x<br />

i i . 7.48<br />

Unlike linear models, it is not generally possible to find analytical expressions<br />

for the estimates of the coefficients of non-linear models, similar to the normal<br />

equations 7.3. These have to be found using st<strong>and</strong>ard numerical search procedures.<br />

The statistical analysis of these models is also a lot more complex. For instance, if<br />

we linearise the model 7.48 using a logarithmic transformation, the errors will no<br />

longer be normal <strong>and</strong> with equal variance.<br />

Comm<strong>and</strong>s 7.3. <strong>SPSS</strong>, <strong>STATISTICA</strong>, <strong>MATLAB</strong> <strong>and</strong> R comm<strong>and</strong>s used to<br />

perform polynomial <strong>and</strong> non-linear regression.<br />

<strong>SPSS</strong><br />

<strong>STATISTICA</strong><br />

<strong>MATLAB</strong><br />

R<br />

Analyze; Regression; Curve Estimation<br />

Analyze; Regression; Nonlinear<br />

<strong>Statistics</strong>; Advanced Linear/Nonlinear<br />

Models; General Linear Models; Polynomial<br />

Regression<br />

<strong>Statistics</strong>; Advanced Linear/Nonlinear<br />

Models; Non-Linear Estimation<br />

[p,S] = polyfit(X,y,n)<br />

[y,delta] = polyconf(p,X,S)<br />

[beta,r,J]= nlinfit(X,y,FUN,beta0)<br />

lm(formula) | glm(formula)<br />

nls(formula, start, algorithm, trace)

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

Saved successfully!

Ooh no, something went wrong!