11.07.2015 Views

INTRODUCTION TO STATISTICAL MODELLING IN R

INTRODUCTION TO STATISTICAL MODELLING IN R

INTRODUCTION TO STATISTICAL MODELLING IN 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.

P.M.E.Altham, University of Cambridge 27The potash data, as a boxplot (potash being a factor)7.2 7.4 7.6 7.8 8.036 54 72 108 144Figure 4.2: Boxplot for cotton bundles datasetmay fail: we may be able to remedy this by replacing Y i by log Y i , or some othertransformation of Y , in the original linear model.Further, ˆɛ should be N(0, (I − H)σ 2 ).In order to check whether this is plausible, we find F n (u) say, the sample distributionfunction of the residuals. We would like to see whetherF n (u) ≃ Φ(u/σ)for some σ (where Φ is as usual, the distribution function of N(0, 1)). This is hardto assess visually, so instead we try to see ifΦ −1 F n (u) ≃ u/σ.This is what lies behind the qqplot. We are just doing a quick check of the linearityof the function Φ −1 F n (u).It’s fun to generate a random sample of size 100 from the t-distribution with 5 df,and find its qqnorm, qqline plots, to assess the systematic departure from a normaldistribution. To do this, tryy

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

Saved successfully!

Ooh no, something went wrong!