Muutke küpsiste eelistusi

E-raamat: R Book 3e 3rd Edition [Wiley Online]

(Imperial College of Science, Technology and Medicine, UK), ,
  • Formaat: 880 pages
  • Ilmumisaeg: 06-Oct-2022
  • Kirjastus: John Wiley & Sons Inc
  • ISBN-10: 1119634466
  • ISBN-13: 9781119634461
Teised raamatud teemal:
  • Wiley Online
  • Hind: 100,44 €*
  • * hind, mis tagab piiramatu üheaegsete kasutajate arvuga ligipääsu piiramatuks ajaks
  • Formaat: 880 pages
  • Ilmumisaeg: 06-Oct-2022
  • Kirjastus: John Wiley & Sons Inc
  • ISBN-10: 1119634466
  • ISBN-13: 9781119634461
Teised raamatud teemal:
"The R language is recognized as one of the most powerful and flexible statistical software packages, enabling users to apply many statistical techniques that would be impossible without such software to help implement such large data sets. R has become an essential tool for understanding and carrying out research. This edition introduces the advantages of the R environment, in a user-friendly format, to beginners and intermediate users in a range of disciplines, from science and engineering to medicine and economics. The format enables it to be either read as a text, or dipped-into as a reference manual. This third edition: Uses RStudio, instead of native R, which provides a far more user-friendly environment for those new to R Revised to account for the evolution of R over the past seven years including new developments and modern teaching methods Takes readers from a starting point of no knowledge of R or programming in general, and very little knowledge of statistics, through to advanced techniques Provides a comprehensive introduction to most areas of statistics used by non-statisticians, with minimal mathematics Explains concepts and how to implement them in R with in-depth discussion on how to interpret the resulting output Contains a large numberof worked examples in R Companion website available with downloadable datasets, slides and other teaching materials Introduces modern ideas in handling data in R, e.g. the tidyverse. Features full colour text and extensive graphics throughout Features a fully revised and updated bibliography and reference section."--

A start-to-finish guide to one of the most useful programming languages for researchers in a variety of fields

In the newly revised Third Edition of The R Book, a team of distinguished teachers and researchers delivers a user-friendly and comprehensive discussion of foundational and advanced topics in the R software language, which is used widely in science, engineering, medicine, economics, and other fields. The book is designed to be used as both a complete text—readable from cover to cover—and as a reference manual for practitioners seeking authoritative guidance on particular topics.

This latest edition offers instruction on the use of the RStudio GUI, an easy-to-use environment for those new to R. It provides readers with a complete walkthrough of the R language, beginning at a point that assumes no prior knowledge of R and very little previous knowledge of statistics. Readers will also find:

  • A thorough introduction to fundamental concepts in statistics and step-by-step roadmaps to their implementation in R;
  • Comprehensive explorations of worked examples in R;
  • A complementary companion website with downloadable datasets that are used in the book;
  • In-depth examination of essential R packages.

Perfect for undergraduate and postgraduate students of science, engineering, medicine economics, and geography, The R Book will also earn a place in the libraries of social sciences professionals.

List of Tables
xxi
Preface xxiii
Acknowledgments xxv
About the Companion Website xxvii
1 Getting Started
1(16)
1.1 Navigating the book
1(2)
1.1.1 How to use this book
1(2)
1.2 R vs. RStudio
3(1)
1.3 Installing R and RStudio
3(1)
1.4 Using RStudio
4(3)
1.4.1 Using R directly via the console
5(1)
1.4.2 Using text editors
5(2)
1.5 The Comprehensive R Archive Network
7(1)
1.5.1 Manuals
7(1)
1.5.2 Frequently asked questions
8(1)
1.5.3 Contributed documentation
8(1)
1.6 Packages in R
8(3)
1.6.1 Contents of packages
9(1)
1.6.2 Finding packages
9(1)
1.6.3 Installing packages
9(2)
1.7 Getting help in R
11(2)
1.7.1 Worked examples of functions
12(1)
1.7.2 Demonstrations of R functions
13(1)
1.8 Good housekeeping
13(2)
1.8.1 Variable types
13(1)
1.8.2 What's loaded or defined in the current session
14(1)
1.8.3 Attaching and detaching objects
14(1)
1.8.4 Projects
15(1)
1.9 Linking to other computer languages
15(2)
References
15(2)
2 Technical Background
17(38)
2.1 Mathematical functions
17(13)
2.1.1 Logarithms and exponentials
18(1)
2.1.2 Trigonometric functions
19(1)
2.1.3 Power laws
20(2)
2.1.4 Polynomial functions
22(2)
2.1.5 Gamma function
24(1)
2.1.6 Asymptotic functions
25(2)
2.1.7 Sigmoid (S-shaped) functions
27(1)
2.1.8 Biexponential function
28(1)
2.1.9 Transformations of model variables
29(1)
2.2 Matrices
30(10)
2.2.1 Matrix multiplication
31(1)
2.2.2 Diagonals of matrices
32(1)
2.2.3 Determinants
33(2)
2.2.4 Inverse of a matrix
35(1)
2.2.5 Eigenvalues and eigenvectors
36(3)
2.2.6 Solving systems of linear equations using matrices
39(1)
2.3 Calculus
40(5)
2.3.1 Differentiation
40(1)
2.3.2 Integration
41(1)
2.3.3 Differential equations
42(3)
2.4 Probability
45(5)
2.4.1 The central limit theorem
45(4)
2.4.2 Conditional probability
49(1)
2.5 Statistics
50(5)
2.5.1 Least squares
51(1)
2.5.2 Maximum likelihood
51(2)
Reference
53(2)
3 Essentials of the R Language
55(152)
3.1 Calculations
56(8)
3.1.1 Complex numbers
57(1)
3.1.2 Rounding
58(1)
3.1.3 Arithmetic
59(2)
3.1.4 Modular arithmetic
61(1)
3.1.5 Operators
62(1)
3.1.6 Integers
63(1)
3.2 Naming objects
64(1)
3.3 Factors
64(3)
3.4 Logical operations
67(7)
3.4.1 TRUE, T, false, F
68(1)
3.4.2 Testing for equality of real numbers
69(1)
3.4.3 Testing for equality of non-numeric objects
70(2)
3.4.4 Evaluation of combinations of TRUE and false
72(1)
3.4.5 Logical arithmetic
73(1)
3.5 Generating sequences
74(4)
3.5.1 Generating repeats
76(1)
3.5.2 Generating factor levels
77(1)
3.6 Class membership
78(4)
3.7 Missing values, infinity, and things that are not numbers
82(4)
3.7.1 Missing values: NA
83(3)
3.8 Vectors and subscripts
86(5)
3.8.1 Extracting elements of a vector using subscripts
87(2)
3.8.2 Classes of vector
89(1)
3.8.3 Naming elements within vectors
90(1)
3.9 Working with logical subscripts
91(2)
3.10 Vector functions
93(16)
3.10.1 Obtaining tables using tapply ()
95(2)
3.10.2 Applying functions to vectors using sapply ()
97(2)
3.10.3 The aggregate () function for grouped summary statistics
99(1)
3.10.4 Parallel minima and maxima: pmin and pmax
100(1)
3.10.5 Finding closest values
101(1)
3.10.6 Sorting, ranking, and ordering
102(2)
3.10.7 Understanding the difference between unique () and duplicated ()
104(2)
3.10.8 Looking for runs of numbers within vectors
106(2)
3.10.9 Sets: union (), intersect (), and setdiff ()
108(1)
3.11 Matrices and arrays
109(17)
3.11.1 Matrices
111(1)
3.11.2 Naming the rows and columns of matrices
112(1)
3.11.3 Calculations on rows or columns of matrices
113(2)
3.11.4 Adding rows and columns to matrices
115(2)
3.11.5 The sweep () function
117(2)
3.11.6 Applying functions to matrices
119(1)
3.11.7 Scaling a matrix
120(1)
3.11.8 Using the max. col () function
121(2)
3.11.9 Restructuring a multi-dimensional array using aperm ()
123(3)
3.12 Random numbers, sampling, and shuffling
126(2)
3.12.1 The sample () function
127(1)
3.13 Loops and repeats
128(10)
3.13.1 More complicated while () loops
131(2)
3.13.2 Loop avoidance
133(1)
3.13.3 The slowness of loops
134(1)
3.13.4 Do not `grow' data sets by concatenation or recursive function calls
135(1)
3.13.5 Loops for producing time series
136(2)
3.14 Lists
138(9)
3.14.1 Summarising lists and lapply ()
140(2)
3.14.2 Manipulating and saving lists
142(5)
3.15 Text, character strings, and pattern matching
147(17)
3.15.1 Pasting character strings together
149(1)
3.15.2 Extracting parts of strings
150(1)
3.15.3 Counting things within strings
151(2)
3.15.4 Upper and lower case text
153(1)
3.15.5 The match () function and relational databases
153(2)
3.15.6 Pattern matching
155(4)
3.15.7 Substituting text within character strings
159(1)
3.15.8 Locations of a pattern within a vector
160(2)
3.15.9 Comparing vectors using %in% and which ()
162(1)
3.15.10 Stripping patterned text out of complex strings
163(1)
3.16 Dates and times in R
164(13)
3.16.1 Reading time data from files
165(3)
3.16.2 Calculations with dates and times
168(2)
3.16.3 Generating sequences of dates
170(3)
3.16.4 Calculating time differences between the rows of a dataframe
173(2)
3.16.5 Regression using dates and times
175(2)
3.17 Environments
177(4)
3.17.1 Using attach () or not!
178(2)
3.17.2 Using attach () in this book
180(1)
3.18 Writing R functions
181(19)
3.18.1 Arithmetic mean of a single sample
181(1)
3.18.2 Median of a single sample
182(1)
3.18.3 Geometric mean
183(1)
3.18.4 Harmonic mean
184(2)
3.18.5 Variance
186(1)
3.18.6 Variance ratio test
187(2)
3.18.7 Using the variance
189(2)
3.18.8 Plots and deparsing in functions
191(1)
3.18.9 The switch () function
192(1)
3.18.10 Arguments in our function
193(2)
3.18.11 Errors in our functions
195(1)
3.18.12 Outputs from our function
196(4)
3.19 Structure of R objects
200(3)
3.20 Writing from R to a file
203(3)
3.20.1 Saving data objects
203(1)
3.20.2 Saving command history
204(1)
3.20.3 Saving graphics or plots
204(1)
3.20.4 Saving data for a spreadsheet
204(1)
3.20.5 Saving output from functions to a file
205(1)
3.21 Tips for writing R code
206(1)
References
206(1)
4 Data Input and Dataframes
207(42)
4.1 Working directory
207(1)
4.2 Data input from files
208(7)
4.2.1 Data input using read, table () and read.csv ()
208(2)
4.2.2 Input from files using scan ()
210(3)
4.2.3 Reading data from a file using readLines ()
213(2)
4.3 Data input directly from the web
215(1)
4.4 Built-in data files
215(1)
4.5 Dataframes
216(25)
4.5.1 Subscripts and indices
220(2)
4.5.2 Selecting rows from the dataframe at random
222(1)
4.5.3 Sorting dataframes
223(6)
4.5.4 Using logical conditions to select rows from the dataframe
229(3)
4.5.5 Omitting rows containing missing values, NA
232(3)
4.5.6 A dataframe with row names instead of row numbers
235(1)
4.5.7 Creating a dataframe from another kind of object
236(3)
4.5.8 Eliminating duplicate rows from a dataframe
239(1)
4.5.9 Dates in dataframes
239(2)
4.6 Using the match () function in dataframes
241(4)
4.6.1 Merging two dataframes
243(2)
4.7 Adding margins to a dataframe
245(4)
4.7.1 Summarising the contents of dataframes
247(2)
5 Graphics
249(48)
5.1 Plotting principles
249(6)
5.1.1 Axes labels and titles
251(1)
5.1.2 Plotting symbols and colours
251(3)
5.1.3 Saving graphics
254(1)
5.2 Plots for single variables
255(10)
5.2.1 Histograms vs. bar charts
255(1)
5.2.2 Histograms
256(4)
5.2.3 Density plots
260(1)
5.2.4 Boxplots
261(1)
5.2.5 Dotplots
262(1)
5.2.6 Bar charts
263(1)
5.2.7 Pie charts
264(1)
5.3 Plots for showing two numeric variables
265(7)
5.3.1 Scatterplot
265(5)
5.3.2 Plots with many identical values
270(2)
5.4 Plots for numeric variables by group
272(5)
5.4.1 Boxplots by group
272(2)
5.4.2 Dotplots by group
274(1)
5.4.3 An inferior (but popular) option
275(2)
5.5 Plots showing two categorical variables
277(2)
5.5.1 Grouped bar charts
277(1)
5.5.2 Mosaic plots
277(2)
5.6 Plots for three (or more) variables
279(4)
5.6.1 Plots of all pairs of variables
279(1)
5.6.2 Incorporating a third variable on a scatterplot
280(1)
5.6.3 Basic 3D plots
281(2)
5.7 Trellis graphics
283(10)
5.7.1 Panel boxplots
285(1)
5.7.2 Panel scatterplots
286(3)
5.7.3 Panel barplots
289(1)
5.7.4 Panels for conditioning plots
290(1)
5.7.5 Panel histograms
291(1)
5.7.6 More panel functions
292(1)
5.8 Plotting functions
293(4)
5.8.1 Two-dimensional plots
293(2)
5.8.2 Three-dimensional plots
295(1)
References
295(2)
6 Graphics in More Detail
297(62)
6.1 More on colour
297(11)
6.1.1 Colour palettes with categorical data
297(2)
6.1.2 The RColorBrewer package
299(3)
6.1.3 Foreground colours
302(1)
6.1.4 Background colours
302(1)
6.1.5 Background colour for legends
303(1)
6.1.6 Different colours for different parts of the graph
304(1)
6.1.7 Full control of colours in plots
305(2)
6.1.8 Cross-hatching and grey scale
307(1)
6.2 Changing the look of graphics
308(3)
6.2.1 Shape and size of plot
308(1)
6.2.2 Multiple plots on one screen
309(1)
6.2.3 Tickmarks and associated labels
309(2)
6.2.4 Font of text
311(1)
6.3 Adding items to plots
311(15)
6.3.1 Adding text
311(2)
6.3.2 Adding smooth parametric curves to a scatterplot
313(1)
6.3.3 Fitting non-parametric curves through a scatterplot
314(2)
6.3.4 Connecting observations
316(5)
6.3.5 Adding shapes
321(1)
6.3.6 Adding mathematical and other symbols
322(4)
6.4 The grammar of graphics and ggplot2
326(4)
6.4.1 Basic structure
327(1)
6.4.2 Examples
327(3)
6.5 Graphics cheat sheet
330(29)
6.5.1 Text justification, adj
332(1)
6.5.2 Annotation of graphs, ann
332(1)
6.5.3 Delay moving on to the next in a series of plots, ask
332(1)
6.5.4 Control over the axes, axis
332(1)
6.5.5 Background colour for plots, bg
333(1)
6.5.6 Boxes around plots, bty
334(1)
6.5.7 Size of plotting symbols using the character expansion function, cex
334(1)
6.5.8 Changing the shape of the plotting region, plt
335(1)
6.5.9 Locating multiple graphs in non-standard layouts using fig
336(1)
6.5.10 Two graphs with a common X scale but different Y scales using fig
336(2)
6.5.11 The layout function
338(2)
6.5.12 Creating and controlling multiple screens on a single device
340(1)
6.5.13 Orientation of numbers on the tick marks, 1as
341(1)
6.5.14 Shapes for the ends and joins of lines, lend and ljoin
342(1)
6.5.15 Line types, lty
343(1)
6.5.16 Line widths, lwd
343(1)
6.5.17 Several graphs on the same page, mf row and mfcol
344(1)
6.5.18 Margins around the plotting area, mar
345(1)
6.5.19 Plotting more than one graph on the same axes, new
346(1)
6.5.20 Outer margins, oma
347(1)
6.5.21 Packing graphs closer together
348(2)
6.5.22 Square plotting region, pty
350(1)
6.5.23 Character rotation, srt
350(1)
6.5.24 Rotating the axis labels
351(1)
6.5.25 Tick marks on the axes
351(2)
6.5.26 Axis styles
353(1)
6.5.27 Summary
353(4)
References
357(2)
7 Tables
359(14)
7.1 Tabulating categorical or discrete data
359(3)
7.1.1 Tables of counts
359(1)
7.1.2 Tables of proportions
360(2)
7.2 Tabulating summaries of numeric data
362(5)
7.2.1 General summaries by group
362(2)
7.2.2 Bespoke summaries by group
364(3)
7.3 Converting between tables and dataframes
367(6)
7.3.1 From a table to a dataframe
367(3)
7.3.2 From a dataframe to a table
370(1)
Reference
371(2)
8 Probability Distributions in R
373(32)
8.1 Probability distributions: the basics
374(2)
8.1.1 Discrete and continuous probability distributions
374(1)
8.1.2 Describing probability distributions mathematically
374(1)
8.1.3 Independence
375(1)
8.2 Probability distributions in R
376(1)
8.3 Continuous probability distributions
377(15)
8.3.1 The Normal (or Gaussian) distribution
377(3)
8.3.2 The Uniform distribution
380(1)
8.3.3 The Chi-squared distribution
381(1)
8.3.4 The F distribution
382(1)
8.3.5 Student's T Distribution
383(2)
8.3.6 The Gamma distribution
385(1)
8.3.7 The Exponential distribution
386(1)
8.3.8 The Beta distribution
387(1)
8.3.9 The Lognormal distribution
388(1)
8.3.10 The Logistic distribution
389(1)
8.3.11 The Weibull distribution
390(1)
8.3.12 Multivariate Normal distribution
390(2)
8.4 Discrete probability distributions
392(10)
8.4.1 The Bernoulli distribution
392(1)
8.4.2 The Binomial distribution
392(3)
8.4.3 The Geometric distribution
395(2)
8.4.4 The Hypergeometric distribution
397(1)
8.4.5 The Multinomial distribution
398(1)
8.4.6 The Poisson distribution
399(1)
8.4.7 The Negative Binomial distribution
400(2)
8.5 The central limit theorem
402(3)
References
404(1)
9 Testing
405(34)
9.1 Principles
406(4)
9.1.1 Defining the question to be tested
406(2)
9.1.2 Assumptions
408(1)
9.1.3 Interpreting results
408(2)
9.2 Continuous data
410(11)
9.2.1 Single population average
410(2)
9.2.2 Two population averages
412(2)
9.2.3 Multiple population averages
414(1)
9.2.4 Population distribution
415(2)
9.2.5 Checking and testing for normality
417(2)
9.2.6 Comparing variances
419(2)
9.3 Discrete and categorical data
421(10)
9.3.1 Sign test
421(2)
9.3.2 Test to compare proportions
423(4)
9.3.3 Contingency tables
427(2)
9.3.4 Testing contingency tables
429(2)
9.4 Bootstrapping
431(2)
9.5 Multiple tests
433(1)
9.6 Power and sample size calculations
434(2)
9.7 A table of tests
436(3)
References
437(2)
10 Regression
439(60)
10.1 The simple linear regression model
440(6)
10.1.1 Model format and assumptions
440(3)
10.1.2 Building a simple linear regression model
443(3)
10.2 The multiple linear regression model
446(12)
10.2.1 Model format and assumptions
446(1)
10.2.2 Building a multiple linear regression model
447(2)
10.2.3 Categorical covariates
449(5)
10.2.4 Interactions between covariates
454(4)
10.3 Understanding the output
458(7)
10.3.1 Residuals
458(1)
10.3.2 Estimates of coefficients
459(1)
10.3.3 Testing individual coefficients
459(1)
10.3.4 Residual standard error
460(1)
10.3.5 R2 and its variants
460(1)
10.3.6 The regression F-test
460(1)
10.3.7 ANOVA: Same model, different output
461(3)
10.3.8 Extracting model information
464(1)
10.4 Fitting models
465(8)
10.4.1 The principle of parsimony
465(2)
10.4.2 First plot the data
467(1)
10.4.3 Comparing nested models
468(2)
10.4.4 Comparing non-nested models
470(1)
10.4.5 Dealing with large numbers of covariates
471(2)
10.5 Checking model assumptions
473(18)
10.5.1 Residuals and standardised residuals
473(1)
10.5.2 Checking for linearity
474(2)
10.5.3 Checking for homoscedasticity of errors
476(1)
10.5.4 Checking for normality of errors
476(2)
10.5.5 Checking for independence of errors
478(1)
10.5.6 Checking for influential observations
479(2)
10.5.7 Checking for collinearity
481(2)
10.5.8 Improving fit
483(8)
10.6 Using the model
491(6)
10.6.1 Interpretation of model
491(4)
10.6.2 Making predictions
495(2)
10.7 Further types of regression modelling
497(2)
References
498(1)
11 Generalised Linear Models
499(80)
11.1 How GLMs work
499(8)
11.1.1 Error structure
499(1)
11.1.2 Linear predictor
500(1)
11.1.3 Link function
501(1)
11.1.4 Model checking
502(4)
11.1.5 Interpretation and prediction
506(1)
11.2 Count data and GLMs
507(15)
11.2.1 A straightforward example
508(3)
11.2.2 Dispersion
511(5)
11.2.3 An alternative to Poisson counts
516(6)
11.3 Count table data and GLMs
522(15)
11.3.1 Log-linear models
522(1)
11.3.2 All covariates might be useful
522(12)
11.3.3 Spine plot
534(3)
11.4 Proportion data and GLMs
537(23)
11.4.1 Theoretical background
538(3)
11.4.2 Logistic regression with binomial errors
541(3)
11.4.3 Predicting x from y
544(1)
11.4.4 Proportion data with categorical explanatory variables
545(5)
11.4.5 Binomial GLM with ordered categorical covariates
550(6)
11.4.6 Binomial GLM with categorical and continuous covariates
556(3)
11.4.7 Revisiting lizards
559(1)
11.5 Binary Response Variables and GLMs
560(14)
11.5.1 A straightforward example
562(2)
11.5.2 Graphical tests of the fit of the logistic curve to data
564(3)
11.5.3 Mixed covariate types with a binary response
567(3)
11.5.4 Spine plot and logistic regression
570(4)
11.6 Bootstrapping a GLM
574(5)
References
577(2)
12 Generalised Additive Models
579(22)
12.1 Smoothing example
580(3)
12.2 Straightforward examples of GAMs
583(5)
12.3 Background to using GAMs
588(1)
12.3.1 Smoothing
588(1)
12.3.2 Suggestions for using gam ()
588(1)
12.4 More complex GAM examples
589(12)
12.4.1 Back to Ozone
590(2)
12.4.2 An example with strongly humped data
592(4)
12.4.3 GAMs with binary data
596(2)
12.4.4 Three-dimensional graphic output from gam
598(1)
References
599(2)
13 Mixed-Effect Models
601(26)
13.1 Regression with categorical covariates
601(1)
13.2 An alternative method: random effects
602(1)
13.3 Common data structures where random effects are useful
603(2)
13.3.1 Nested (hierarchical) structures
604(1)
13.3.2 Non-nested structures
604(1)
13.3.3 Longitudinal structures
605(1)
13.4 R packages to deal with mixed effects models
605(2)
13.4.1 The nlme package
605(1)
13.4.2 The lme4 package
606(1)
13.4.3 Methods for fitting mixed models
606(1)
13.5 Examples of implementing random effect models
607(15)
13.5.1 Multilevel data (two levels)
607(4)
13.5.2 Multilevel data (three levels)
611(3)
13.5.3 Designed experiment: split-plot
614(3)
13.5.4 Longitudinal data
617(5)
13.6 Generalised linear mixed models
622(3)
13.6.1 Logistic mixed model
622(3)
13.7 Alternatives to mixed models
625(2)
References
625(2)
14 Non-linear Regression
627(22)
14.1 Example: modelling deer jaw bone length
628(6)
14.1.1 An exponential model for the deer data
629(3)
14.1.2 A Michaelis-Menten model for the deer data
632(2)
14.1.3 Comparison of the exponential and the Michaelis-Menten model
634(1)
14.2 Example: grouped data
634(4)
14.3 Self-starting functions
638(7)
14.3.1 Self-starting Michaelis--Menten model
638(2)
14.3.2 Self-starting asymptotic exponential model
640(2)
14.3.3 Self-starting logistic
642(1)
14.3.4 Self-starting four-parameter logistic
643(2)
14.4 Further considerations
645(4)
14.4.1 Model checking
645(2)
14.4.2 Confidence intervals
647(1)
References
648(1)
15 Survival Analysis
649(18)
15.1 Handling survival data
649(3)
15.1.1 Structure of a survival dataset
649(3)
15.1.2 Survival data in R
652(1)
15.2 The survival and hazard functions
652(3)
15.2.1 Non-parametric estimation of the survival function
653(1)
15.2.2 Parametric estimation of the survival function
654(1)
15.3 Modelling survival data
655(12)
15.3.1 The data
657(1)
15.3.2 The Cox proportional hazard model
658(2)
15.3.3 Accelerated failure time models
660(5)
15.3.4 Cox proportional hazard or a parametric model?
665(1)
References
665(2)
16 Designed Experiments
667(32)
16.1 Factorial experiments
667(6)
16.1.1 Expanding data
672(1)
16.2 Pseudo-replication
673(4)
16.2.1 Split-plot effects
673(2)
16.2.2 Removing pseudo-replication
675(1)
16.2.3 Derived variable analysis
676(1)
16.3 Contrasts
677(22)
16.3.1 Contrast coefficients
678(1)
16.3.2 An example of contrasts using R
679(5)
16.3.3 Model simplification for contrasts
684(4)
16.3.4 Helmert contrasts
688(1)
16.3.5 Sum contrasts
689(2)
16.3.6 Polynomial contrasts
691(3)
16.3.7 Contrasts with multiple covariates
694(4)
References
698(1)
17 Meta-Analysis
699(16)
17.1 Elements of a meta-analysis
699(4)
17.1.1 Choosing studies for a meta-analysis
700(1)
17.1.2 Effects and effect size
700(1)
17.1.3 Weights
701(1)
17.1.4 Fixed vs. random effect models
701(2)
17.2 Meta-analysis in R
703(4)
17.2.1 Formatting information from studies
703(1)
17.2.2 Computing the inputs of a meta-analysis
703(3)
17.2.3 Conducting the meta-analysis
706(1)
17.3 Examples
707(4)
17.3.1 Meta-analysis Of scaled differences
707(4)
17.4 Meta-analysis of categorical data
711(4)
References
714(1)
18 Time Series
715(26)
18.1 Moving average
715(2)
18.2 Blowflies
717(6)
18.3 Seasonal data
723(6)
18.3.1 Point of view
724(1)
18.3.2 Built in ts () functions
724(2)
18.3.3 Cycles
726(2)
18.3.4 Testing for a time series trend
728(1)
18.4 Multiple time series
729(1)
18.5 Some theoretical background
730(3)
18.5.1 Autocorrelation
731(1)
18.5.2 Autoregressive models
732(1)
18.5.3 Partial autocorrelation
732(1)
18.5.4 Moving average models
732(1)
18.5.5 More general models: ARMA and ARIMA
733(1)
18.6 ARIMA example
733(2)
18.7 Simulation of time series
735(6)
Reference
739(2)
19 Multivartate Statistics
741(20)
19.1 Visualising data
742(1)
19.2 Multivariate analysis of variance
743(2)
19.3 Principal component analysis
745(3)
19.4 Factor analysis
748(3)
19.5 Cluster analysis
751(3)
19.5.1 K-Means
751(3)
19.6 Hierarchical cluster analysis
754(2)
19.7 Discriminant analysis
756(2)
19.8 Neural networks
758(3)
References
760(1)
20 Classification and Regression Trees
761(18)
20.1 How CARTs work
763(1)
20.2 Regression trees
764(7)
20.2.1 The tree package
764(1)
20.2.2 The rpart package
765(2)
20.2.3 Comparison with linear regression
767(2)
20.2.4 Model simplification
769(2)
20.3 Classification trees
771(4)
20.3.1 Classification trees with categorical explanatory variables
771(2)
20.3.2 Classification trees for replicated data
773(2)
20.4 Looking for patterns
775(4)
References
777(2)
21 Spatial Statistics
779(20)
21.1 Spatial point processes
779(14)
21.1.1 How can we check for randomness?
781(4)
21.1.2 Models
785(5)
21.1.3 Marks
790(3)
21.2 Geospatial statistics
793(6)
21.2.1 Models
794(4)
References
798(1)
22 Bayesian Statistics
799(24)
22.1 Components of a Bayesian Analysis
800(6)
22.1.1 The likelihood (the model and data)
800(1)
22.1.2 Priors
801(1)
22.1.3 The Posterior
802(1)
22.1.4 Markov chain Monte Carlo (MCMC)
803(1)
22.1.5 Considerations for MCMC
803(2)
22.1.6 Inference
805(1)
22.1.7 The Pros and Cons of going Bayesian
806(1)
22.2 Bayesian analysis in R
806(4)
22.2.1 Installing JAGS
807(1)
22.2.2 Running JAGS in R
807(1)
22.2.3 Writing BUGS models
808(2)
22.3 Examples
810(8)
22.3.1 MCMC for a simple linear regression
810(4)
22.3.2 MCMC for longitudinal data
814(4)
22.4 MCMC for a model with binomial errors
818(5)
References
821(2)
23 Simulation Models
823(16)
23.1 Temporal dynamics
823(3)
23.1.1 Chaotic dynamics in population size
823(2)
23.1.2 Investigating the route to chaos
825(1)
23.2 Spatial simulation models
826(11)
23.2.1 Meta-population dynamics
826(3)
23.2.2 Coexistence resulting from spatially explicit (local) density dependence
829(5)
23.2.3 Pattern generation resulting from dynamic interactions
834(3)
23.3 Temporal and spatial dynamics: random walk
837(2)
References
838(1)
Index 839
Elinor Jones, PhD, is an Associate Professor (Teaching) in the Department of Statistical Science at University College London. She is an experienced teacher with a background in statistics consultancy in a range of fields.

Simon Harden, PhD, is an Associate Professor (Teaching) in the Department of Statistical Science at University College London. He has taught R and statistics to people with a wide range of backgrounds, and has experience working in finance and IT.

Michael J Crawley FRS is Emeritus Professor of Plant Ecology at Imperial College London.