11.07.2015 Views

Preface to First Edition - lib

Preface to First Edition - lib

Preface to First Edition - lib

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

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

ANALYSIS USING R 61R> cor.test(~ mortality + hardness, data = water)Pearson's product-moment correlationdata: mortality and hardnesst = -6.6555, df = 59, p-value = 1.033e-0895 percent confidence interval:-0.7783208 -0.4826129sample estimates:cor-0.6548486Figure 3.9R output of Pearsons’ correlation coefficient for the water data.R> data("pis<strong>to</strong>nrings", package = "HSAUR2")R> chisq.test(pis<strong>to</strong>nrings)Pearson's Chi-squared testdata: pis<strong>to</strong>nringsX-squared = 11.7223, df = 6, p-value = 0.06846Figure 3.10R output of the chi-squared test for the pis<strong>to</strong>nrings data.depicts the residuals for the pis<strong>to</strong>n ring data. The deviations from independenceare largest for C1 and C4 compressors in the centre and south leg.It is tempting <strong>to</strong> think that the size of these residuals may be judged bycomparison with standard normal percentage points (for example greater than1.96 or less than 1.96 for significance level α = 0.05). Unfortunately it can beshown that the variance of a standardised residual is always less than or equal<strong>to</strong> one, and in some cases considerably less than one, however, the residualsare asymp<strong>to</strong>tically normal. A more satisfac<strong>to</strong>ry ‘residual’ for contingency tabledata is considered in Exercise 3.3.3.3.5 Rearrests of JuvenilesThe data in Table 3.5 are available as table object viaR> data("rearrests", package = "HSAUR2")R> rearrestsJuvenile courtAdult court Rearrest No rearrestRearrest 158 515No rearrest 290 1134and in rearrests the counts in the four cells refer <strong>to</strong> the matched pairs ofsubjects; for example, in 158 pairs both members of the pair were rearrested.© 2010 by Taylor and Francis Group, LLC

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

Saved successfully!

Ooh no, something went wrong!