|
|
1 | (6) |
|
1.1 Who is this book for? |
|
|
1 | (1) |
|
1.2 What this book is not about |
|
|
1 | (1) |
|
1.3 How to read this book |
|
|
2 | (2) |
|
1.3.1 Examples and tutorials |
|
|
3 | (1) |
|
1.4 How this book was written |
|
|
4 | (1) |
|
|
4 | (3) |
|
|
4 | (1) |
|
1.5.2 R does not have to be installed into system directories |
|
|
5 | (1) |
|
|
5 | (1) |
|
1.5.4 R has a high-quality graphics system |
|
|
5 | (1) |
|
1.5.5 R allows you to share your analyses with others |
|
|
6 | (1) |
|
|
7 | (38) |
|
2.1 Who should read this chapter? |
|
|
7 | (1) |
|
|
7 | (1) |
|
|
8 | (1) |
|
2.3.1 Data sets, observations, and variables |
|
|
8 | (1) |
|
|
8 | (1) |
|
2.3.2.1 Quantitative or qualitative |
|
|
8 | (1) |
|
2.3.2.2 Continuous, discrete, nominal, and ordinal |
|
|
9 | (1) |
|
2.4 Simple descriptive statistics |
|
|
9 | (4) |
|
2.4.1 Labeling the observations |
|
|
10 | (1) |
|
2.4.2 The sample mean, standard deviation, and variance |
|
|
10 | (2) |
|
2.4.3 Order statistics, medians, quartiles, and quantiles |
|
|
12 | (1) |
|
|
13 | (14) |
|
2.5.1 An important question |
|
|
13 | (1) |
|
2.5.2 Univariate data analysis |
|
|
14 | (1) |
|
|
14 | (1) |
|
2.5.4 Two categorical variables |
|
|
14 | (2) |
|
2.5.4.1 Comparing two proportions |
|
|
16 | (1) |
|
|
17 | (1) |
|
2.5.5.1 Measures of location or center |
|
|
17 | (1) |
|
2.5.5.2 Measures of scale or spread |
|
|
18 | (2) |
|
2.5.5.3 Distributional shape and other features |
|
|
20 | (1) |
|
2.5.5.4 Example 2.1---Comparing grouped data |
|
|
21 | (2) |
|
2.5.6 Two quantitative variables |
|
|
23 | (2) |
|
2.5.6.1 Two quantitative variables---a case study |
|
|
25 | (2) |
|
2.5.7 Closing remarks for the chapter |
|
|
27 | (1) |
|
2.6 Installing R on your computer |
|
|
27 | (1) |
|
|
28 | (4) |
|
|
29 | (2) |
|
2.7.1.1 Checking your data has loaded correctly |
|
|
31 | (1) |
|
|
31 | (1) |
|
|
32 | (1) |
|
|
33 | (12) |
|
2.9.1 Three simple things |
|
|
33 | (1) |
|
|
34 | (4) |
|
2.9.2 R data types and manipulating R objects |
|
|
38 | (2) |
|
|
40 | (5) |
|
|
45 | (34) |
|
3.1 Who should read this chapter? |
|
|
45 | (1) |
|
|
45 | (1) |
|
3.2.1 A little bit of language |
|
|
45 | (1) |
|
3.3 Why are we doing this? |
|
|
46 | (1) |
|
3.4 Flexible versus "canned" |
|
|
46 | (1) |
|
3.5 Drawing simple graphs |
|
|
46 | (14) |
|
3.5.1 Basic plotting tools |
|
|
47 | (1) |
|
|
47 | (1) |
|
3.5.3 Kernel density estimates |
|
|
47 | (3) |
|
|
50 | (1) |
|
|
51 | (1) |
|
3.5.6 Plotting categorical data |
|
|
51 | (2) |
|
|
53 | (1) |
|
3.5.6.2 Pie graphs, perspective, and other distractions |
|
|
53 | (3) |
|
3.5.7 One categorical and one continuous variable |
|
|
56 | (1) |
|
3.5.7.1 Comparing distributional shape |
|
|
57 | (2) |
|
3.5.8 Two quantitative variables |
|
|
59 | (1) |
|
3.6 Annotating and embellishing plots |
|
|
60 | (4) |
|
|
60 | (1) |
|
3.6.2 Lines and smoothers |
|
|
61 | (1) |
|
|
61 | (1) |
|
3.6.3 Text and point highlighting |
|
|
62 | (1) |
|
|
63 | (1) |
|
3.6.5 Arrows, circles, and everything else |
|
|
63 | (1) |
|
|
64 | (12) |
|
|
64 | (4) |
|
3.7.2 Drawing histograms and kernel density estimates |
|
|
68 | (2) |
|
|
70 | (1) |
|
3.7.4 Drawing scatter plots |
|
|
71 | (2) |
|
3.7.5 Getting your graph out of R and into another program |
|
|
73 | (1) |
|
3.7.5.1 Bitmap and vector graphic file formats |
|
|
74 | (1) |
|
3.7.5.2 Using R commands to save graphs |
|
|
75 | (1) |
|
|
76 | (3) |
|
4 Hypothesis tests and sampling theory |
|
|
79 | (38) |
|
4.1 Who should read this chapter? |
|
|
79 | (1) |
|
4.2 Topics covered in this chapter |
|
|
79 | (1) |
|
|
80 | (1) |
|
4.4 Statistical distributions |
|
|
80 | (8) |
|
4.4.1 Some concepts and notation |
|
|
80 | (2) |
|
4.4.2 The normal distribution |
|
|
82 | (3) |
|
4.4.3 Student's t-distribution |
|
|
85 | (1) |
|
4.4.4 The binomial distribution |
|
|
86 | (1) |
|
4.4.5 The Poisson distribution |
|
|
87 | (1) |
|
4.4.6 The x2-distribution |
|
|
87 | (1) |
|
|
87 | (1) |
|
4.4.8 Distribution terminology |
|
|
87 | (1) |
|
4.5 Introduction to statistical hypothesis testing |
|
|
88 | (23) |
|
4.5.1 Statistical inference |
|
|
88 | (1) |
|
|
88 | (1) |
|
4.5.2 A general framework for hypothesis tests |
|
|
89 | (2) |
|
4.5.3 Confidence intervals |
|
|
91 | (1) |
|
4.5.3.1 The relationship between hypothesis tests and confidence intervals |
|
|
92 | (1) |
|
4.5.4 Statistically significant, significance level, significantly different, confidence, and other confusing phrases |
|
|
93 | (1) |
|
4.5.5 The two sample t-test |
|
|
94 | (1) |
|
4.5.5.1 Example 4.1---Differences in RI of different glass strata |
|
|
94 | (2) |
|
4.5.5.2 Example 4.2---Difference in RI between bulk and near-float surface glass |
|
|
96 | (2) |
|
4.5.6 The sampling distribution of the sample mean and other statistics |
|
|
98 | (4) |
|
4.5.7 The X2-test of independence |
|
|
102 | (2) |
|
4.5.7.1 Example 4.3---Occipital squamous bone widths |
|
|
104 | (1) |
|
4.5.7.2 Comparing two proportions |
|
|
105 | (1) |
|
4.5.7.3 Example 4.4---Comparing two proportions relating to occipital squamous bones |
|
|
106 | (1) |
|
4.5.7.4 Example 4.5---SIDS and extramedullary haematopoiesis |
|
|
107 | (1) |
|
4.5.7.5 Fisher's exact test |
|
|
107 | (1) |
|
4.5.7.6 Example 4.6---Using Fisher's exact test |
|
|
108 | (2) |
|
4.5.7.7 Example 4.7---Age and gender of victims of crime |
|
|
110 | (1) |
|
|
111 | (6) |
|
|
117 | (94) |
|
5.1 Who should read this? |
|
|
117 | (1) |
|
5.2 How to read this chapter |
|
|
117 | (1) |
|
5.3 Simple linear regression |
|
|
118 | (15) |
|
5.3.1 Example 5.1---Manganese and barium |
|
|
119 | (2) |
|
5.3.2 Example 5.2---DPD and age estimation |
|
|
121 | (6) |
|
5.3.2.1 The normal Q-Q plot |
|
|
127 | (1) |
|
5.3.3 Zero intercept models or regression through the origin |
|
|
128 | (1) |
|
|
129 | (4) |
|
5.4 Multiple linear regression |
|
|
133 | (18) |
|
5.4.1 Example 5.3---Range of fire estimation |
|
|
133 | (7) |
|
5.4.2 Example 5.4---Elemental concentration in beer bottles |
|
|
140 | (2) |
|
5.4.3 Example 5.5---Age estimation from teeth |
|
|
142 | (4) |
|
5.4.4 Example 5.6---Regression with derived variables |
|
|
146 | (1) |
|
|
146 | (5) |
|
5.5 Calibration in the simple linear regression case |
|
|
151 | (9) |
|
5.5.1 Example 5.7---Calibration of RI measurements |
|
|
153 | (2) |
|
5.5.2 Example 5.8---Calibration in range of fire experiments |
|
|
155 | (1) |
|
|
156 | (4) |
|
5.6 Regression with factors |
|
|
160 | (8) |
|
5.6.1 Example 5.9---Dummy variables in regression |
|
|
163 | (1) |
|
5.6.2 Example 5.10---Dummy variables in regression II |
|
|
164 | (2) |
|
5.6.3 A pitfall for the unwary |
|
|
166 | (1) |
|
|
167 | (1) |
|
5.7 Linear models for grouped data---One-way ANOVA |
|
|
168 | (25) |
|
5.7.1 Example 5.11---RI differences |
|
|
170 | (4) |
|
5.7.2 Three procedures for multiple comparisons |
|
|
174 | (1) |
|
5.7.2.1 Bonferroni's correction |
|
|
174 | (1) |
|
5.7.2.2 Fisher's protected least significant difference (LSD) |
|
|
175 | (1) |
|
5.7.2.3 Tukey's Honestly Significant Difference (HSD) or the Tukey-Kramer method |
|
|
176 | (1) |
|
|
177 | (1) |
|
|
178 | (2) |
|
5.7.3 Dropping the assumption of equal variances |
|
|
180 | (1) |
|
5.7.3.1 Example 5.12---GHB concentration in urine |
|
|
181 | (1) |
|
5.7.3.2 An alternative procedure for estimating the weights |
|
|
182 | (1) |
|
5.7.3.3 Example 5.13---Weighted least squares |
|
|
183 | (1) |
|
|
183 | (10) |
|
|
193 | (15) |
|
5.8.1 The hypotheses for two-way ANOVA models |
|
|
195 | (1) |
|
5.8.2 Example 5.14---DNA left on drinking containers |
|
|
196 | (5) |
|
|
201 | (7) |
|
5.9 Unifying the linear model |
|
|
208 | (3) |
|
|
208 | (3) |
|
6 Modeling count and proportion data |
|
|
211 | (46) |
|
6.1 Who should read this? |
|
|
211 | (1) |
|
6.2 How to read this chapter |
|
|
211 | (1) |
|
|
212 | (1) |
|
6.4 Poisson regression or Poisson GLMs |
|
|
213 | (6) |
|
6.4.1 Example 6.1---Glass fragments on the ground |
|
|
213 | (6) |
|
6.5 The negative binomial GLM |
|
|
219 | (15) |
|
6.5.1 Example 6.2---Over-dispersed data |
|
|
220 | (3) |
|
6.5.2 Example 6.3---Thoracic injuries in car crashes |
|
|
223 | (1) |
|
6.5.3 Example 6.4---Over-dispersion in car crash data |
|
|
223 | (2) |
|
|
225 | (9) |
|
6.6 Logistic regression or the binomial GLM |
|
|
234 | (19) |
|
6.6.1 Example 6.5---Logistic regression for SIDS risks |
|
|
236 | (1) |
|
6.6.2 Logistic regression with quantitative explanatory variables |
|
|
237 | (1) |
|
6.6.3 Example 6.6---Carbohydrate deficient transferrin as a predictor of alcohol abuse |
|
|
237 | (3) |
|
6.6.4 Example 6.7---Morphine concentration ratios as a predictor of acute morphine deaths |
|
|
240 | (2) |
|
6.6.5 Example 6.8---Risk factors for thoracic injuries |
|
|
242 | (1) |
|
6.6.6 Pitfalls for the unwary |
|
|
243 | (2) |
|
6.6.7 Example 6.9---Complete separation of the response in logistic regression |
|
|
245 | (1) |
|
|
245 | (8) |
|
|
253 | (4) |
|
7 The design of experiments |
|
|
257 | (38) |
|
|
257 | (1) |
|
7.2 Who should read this chapter? |
|
|
258 | (1) |
|
7.3 What is an experiment? |
|
|
258 | (1) |
|
7.4 The components of an experiment |
|
|
259 | (2) |
|
7.4.1 Questions of interest? |
|
|
259 | (1) |
|
|
259 | (1) |
|
|
260 | (1) |
|
|
260 | (1) |
|
7.4.5 Structure in experimental units |
|
|
261 | (1) |
|
7.4.6 Assignment of treatments to experimental units |
|
|
261 | (1) |
|
7.5 The principles of experimental design |
|
|
261 | (2) |
|
|
262 | (1) |
|
|
262 | (1) |
|
|
263 | (1) |
|
7.6 The description and analysis of experiments |
|
|
263 | (1) |
|
7.7 Fixed and random effects |
|
|
263 | (1) |
|
7.8 Completely randomized designs |
|
|
264 | (8) |
|
|
264 | (1) |
|
|
265 | (1) |
|
7.8.1.2 Treatment structure |
|
|
265 | (1) |
|
|
265 | (1) |
|
|
266 | (1) |
|
7.8.1.5 Factorial treatment structure |
|
|
267 | (2) |
|
7.8.1.6 Interaction plots |
|
|
269 | (1) |
|
7.8.1.7 Quantitative factors |
|
|
269 | (3) |
|
7.9 Randomized complete block designs |
|
|
272 | (18) |
|
|
272 | (1) |
|
7.9.2 Data model for RCBDs |
|
|
272 | (1) |
|
7.9.2.1 Example 7.1---Annealing of glass |
|
|
272 | (1) |
|
7.9.2.2 Treatment structure |
|
|
273 | (1) |
|
|
273 | (1) |
|
7.9.2.4 Tutorial: Analysis in R |
|
|
273 | (3) |
|
7.9.2.5 Example 7.2---DNA left on drinking containers |
|
|
276 | (2) |
|
7.9.2.6 Example 7.3---Blood alcohol determination |
|
|
278 | (1) |
|
7.9.2.7 Treatment structure |
|
|
278 | (1) |
|
|
278 | (1) |
|
7.9.2.9 Tutorial - analysis in R |
|
|
278 | (3) |
|
7.9.3 Randomized block designs and repeated measures experiments |
|
|
281 | (1) |
|
7.9.3.1 Example 7.4---Musket shot |
|
|
282 | (2) |
|
7.9.3.2 Treatment structure |
|
|
284 | (1) |
|
7.9.3.3 Blocking structure |
|
|
284 | (1) |
|
7.9.3.4 Tutorial - Analysis in R |
|
|
284 | (6) |
|
7.10 Designs with fewer experimental units |
|
|
290 | (2) |
|
7.10.1 Balanced incomplete block designs |
|
|
290 | (1) |
|
7.10.1.1 Example 7.5---DNA left on drinking containers II |
|
|
291 | (1) |
|
7.10.2 2p factorial experiments |
|
|
291 | (1) |
|
|
292 | (3) |
Bibliography |
|
295 | (6) |
Index |
|
301 | (8) |
Example Index |
|
309 | |