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 193R> layout(matrix(1:3, nrow = 1))R> spineplot(Kyphosis ~ Age, data = kyphosis,+ ylevels = c("present", "absent"))R> spineplot(Kyphosis ~ Number, data = kyphosis,+ ylevels = c("present", "absent"))R> spineplot(Kyphosis ~ Start, data = kyphosis,+ ylevels = c("present", "absent"))Kyphosispresent absent0 20 80 120 1600.0 0.2 0.4 0.6 0.8 1.0Kyphosispresent absent2 3 4 5 70.0 0.2 0.4 0.6 0.8 1.0Kyphosispresent absent0 4 8 12 14 160.0 0.2 0.4 0.6 0.8 1.0AgeNumberStartFigure 10.8Spinograms of the three explora<strong>to</strong>ry variables and response variablekyphosis.involved, we investigate the partial associations by so-called spinograms, asintroduced in Chapter 2. The numeric explora<strong>to</strong>ry covariates are discretisedand their empirical relative frequencies are plotted against the conditionalfrequency of kyphosis in the corresponding group. Figure 10.8 shows thatkyphosis is absent in very young or very old children, children with a smallstarting vertebral level and high number of vertebrae involved.The logistic additive model needed <strong>to</strong> describe the conditional probabilityof kyphosis given the explora<strong>to</strong>ry variables can be fitted using function gam.Here, the dimension of the basis (k) has <strong>to</strong> be modified for Number and Startsince these variables are heavily tied. As for generalised linear models, thefamily argument determines the type of model <strong>to</strong> be fitted, a logistic modelin our case:R> kyphosis_gam kyphosis_gamFamily: binomialLink function: logit© 2010 by Taylor and Francis Group, LLC

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

Saved successfully!

Ooh no, something went wrong!