
Research Methods Using R
Advanced Data Analysis in the Behavioural and Biological Sciences
By: Daniel H. Baker
eText | 6 April 2022
At a Glance
Format
ePUB
ePUB
eText
$51.63
or 4 interest-free payments of $12.91 with
orInstant online reading in your Booktopia eTextbook Library *
Why choose an eTextbook?
Instant Access *
Purchase and read your book immediately
Read Aloud
Listen and follow along as Bookshelf reads to you
Study Tools
Built-in study tools like highlights and more
* eTextbooks are not downloadable to your eReader or an app and can be accessed via web browsers only. You must be connected to the internet and have no technical issues with your device or browser that could prevent the eTextbook from operating.
Providing complete coverage of advanced research methods for undergraduates, Daniel H. Baker supports students in their mastery of more advanced research methods and their application in R.
This brand new title brings together coverage of a variety of topics for readers with basic statistical knowledge. It begins with material on the fundamental tools - nonlinear curve fitting and function optimization, stochastic methods, and Fourier (frequency) analysis - before leading readers on to more specialist content - bivariate and multivariate statistics, Bayesian statistics, and machine learning methods. Several chapters also discuss methods that can be used to improve research practises, including power analysis, meta-analysis, reproducible data analysis.
Written to build a student's confidence with using R in a step-by-step way, early chapters present the essentials, ensuring that the content is accessible to those that have never programmed before. By giving them a feel for how the software works in practice, students are gradually introduced to simple examples of techniques before building up to more detailed implementations demonstrated in worked examples.
Readers are also presented with opportunities to try analysis techniques for themselves. Practice questions are presented at the end of each chapter with answer guidance supplied in the book, while multiple-choice-questions with instant feedback can be accessed online. The author also provides datasets online which students can use to practise their new skills.
Digital formats and resources This book is available for students and institutions to purchase in a variety of formats, and is supported by online resources.
- The e-book offers a mobile experience and convenient access along with functionality, navigation features, and links that offer extra learning support. This book is accompanied by online resources including multiple-choice-questions with instant feedback, example code, and data files allowing students to run examples independently.
This brand new title brings together coverage of a variety of topics for readers with basic statistical knowledge. It begins with material on the fundamental tools - nonlinear curve fitting and function optimization, stochastic methods, and Fourier (frequency) analysis - before leading readers on to more specialist content - bivariate and multivariate statistics, Bayesian statistics, and machine learning methods. Several chapters also discuss methods that can be used to improve research practises, including power analysis, meta-analysis, reproducible data analysis.
Written to build a student's confidence with using R in a step-by-step way, early chapters present the essentials, ensuring that the content is accessible to those that have never programmed before. By giving them a feel for how the software works in practice, students are gradually introduced to simple examples of techniques before building up to more detailed implementations demonstrated in worked examples.
Readers are also presented with opportunities to try analysis techniques for themselves. Practice questions are presented at the end of each chapter with answer guidance supplied in the book, while multiple-choice-questions with instant feedback can be accessed online. The author also provides datasets online which students can use to practise their new skills.
Digital formats and resources This book is available for students and institutions to purchase in a variety of formats, and is supported by online resources.
- The e-book offers a mobile experience and convenient access along with functionality, navigation features, and links that offer extra learning support. This book is accompanied by online resources including multiple-choice-questions with instant feedback, example code, and data files allowing students to run examples independently.
on
Desktop
Tablet
Mobile
1. Cover
2. Title Page
3. Copyright page
4. Acknowledgements
5. Table of Contents
6. 1 Introduction
7. What is this book about?
8. Who will find this book useful?
9. Topics covered
10. Some words of caution
11. Implementation in R
12. History
13. 2 Introduction to the R environment
14. What is R?
15. RStudio
16. Finding your way around RStudio
17. Customizing RStudio for your own needs
18. Scripts
19. Data objects
20. Functions
21. Packages
22. Conditional statements
23. Loops
24. Importing data
25. How to find out how to do something
26. Table of useful core R functions
27. Practice questions
28. 3 Cleaning and preparing data for analysis
29. Why do data need to be ‘cleaned’?
30. Organizing data in wide and long formats
31. Inspecting data: histograms and scatterplots
32. Identifying outliers objectively
33. Tukey’s ‘fence’ method
34. Standard deviations and related criteria
35. The Mahalanobis distance for multivariate data
36. Identifying missing and out-of-range values
37. What should we do with outliers?
38. Normalizing and rescaling data
39. Transforming data and testing assumptions
40. Recoding categorical data and assigning factor labels
41. Putting it all together—importing and cleaning some real data
42. Practice questions
43. 4 Statistical tests as linear models
44. Many statistical tests involve comparing different models
45. Regression (and correlation)
46. T-tests
47. ANOVA
48. Assumptions of linear models
49. Is everything just a linear model then?
50. Practice questions
51. 5 Power analysis
52. What is statistical power?
53. Effect size
54. How can we estimate effect size?
55. Power curves
56. Problems with low power
57. Problems with high power
58. Measurement precision impacts power
59. Reporting the results of a power analysis
60. Post-hoc power analysis
61. Doing power analysis in R
62. Practice questions
63. 6 Meta-analysis
64. Why is meta-analysis important?
65. Designing a meta-analysis
66. Conducting and summarizing a literature search
67. Different measures of effect size
68. Converting between effect sizes
69. Fixed and random effects
70. Forest plots
71. Weighted averaging
72. Publication bias and funnel plots
73. Some example meta-analyses
74. Calculating and converting effect sizes in R
75. Conducting a meta-analysis in R
76. Practice questions
77. 7 Mixed-effects models
78. Different types of mixed-effects model
79. Mixed-effects regression example: lung function in bottlenose dolphins
80. Factorial mixed-effects example: lexical decision task for nouns and verbs
81. How can I decide if an effect is fixed or random?
82. Dealing elegantly with missing data and unequal groups
83. Reporting and comparing mixed-effects models
84. Practical problems with model convergence
85. Running mixed-effects models in R with lmerTest
86. Further resources for mixed-effects models
87. Practice questions
88. 8 Stochastic methods
89. What does stochastic mean?
90. Ways of generating random numbers
91. Part 1: Using random numbers to find stuff out
92. Stochastic simulations: models and synthetic data
93. Generating random numbers in R from different distributions
94. Part 2: Resampling methods
95. Resampling with and without replacement
96. Using resampling for hypothesis testing
97. How to do resampling in R
98. Further reading
99. Practice questions
100. 9 Non-linear curve fitting
101. Fitting models to data
102. Linear models
103. Non-linear models
104. A practical example: exponential modelling of disease contagion
105. Parameter spaces and the combinatorial explosion
106. Optimization algorithms
107. The downhill simplex algorithm
108. Local minima
109. Some practical considerations
110. Two philosophical approaches in model fitting
111. Tools to help with model development
112. How to fit curves to data in R
113. Practice questions
114. 10 Fourier analysis
115. Joseph Fourier: polymath
116. Example applications
117. Terminology
118. The amplitude spectrum
119. The phase spectrum
120. Limitations on sampling: the Nyquist limit and frequency resolution
121. Example: bat species identification by frequency
122. Fourier analysis in two dimensions
123. Example: using 2D Fourier analysis to measure goosebumps
124. Filtering: altering signals in the Fourier domain
125. Stimulus construction in the Fourier domain
126. Doing Fourier analysis in R
127. Practice questions
128. 11 Multivariate t-tests
129. Thinking about and visualizing bivariate data
130. The one-sample and paired Hotelling’s statistic
131. Example: multivariate analysis of periodic EEG data
132. The two-sample (independent) Hotelling’s statistic
133. Example: visual motor responses in zebrafish larvae
134. The statistic
135. Mahalanobis distance as an effect size measure for multivariate statistics
136. Calculating Hotelling’s T2 in R
137. Practice questions
138. 12 Structural equation modelling
139. How are different mental abilities related?
140. Testing hypotheses using data with structural equation modelling
141. SEM stage 1: model specification
142. SEM stage 2: model identification
143. SEM stage 3: model evaluation
144. SEM stage 4: model modification
145. Comparing different models
146. Cross-validation on fresh data sets
147. Power and SEM
148. Dealing with missing data
149. Doing SEM in R using the lavaan package
150. Practice questions
151. 13 Multidimensional scaling and k-means clustering
152. The k-means clustering algorithm
153. Comparing different numbers of clusters
154. Example: k-means clustering of dinosaur species
155. Variants of k-means clustering
156. The multidimensional scaling algorithm
157. Metric vs non-metric MDS
158. Example: multidimensional scaling of viruses
159. Combining k-means clustering and MDS
160. Normalizing multivariate data
161. Examples from the literature of k-means clustering and MDS
162. Doing k-means clustering in R
163. Doing multidimensional scaling in R
164. Practice questions
165. 14 Multivariate pattern analysis
166. Why use machines?
167. Predicting group membership
168. Different types of classifier algorithm and pattern analysis
169. Situations with more than two categories
170. Preparing data for analysis
171. Assessing statistical significance
172. Ethical issues with machine learning and classification
173. Doing MVPA in R using the Caret package
174. Categorizing cell body segmentation
175. Decoding fMRI data
176. Practice questions
177. 15 Correcting for multiple comparisons
178. The problem of multiple comparisons
179. The traditional solution: Bonferroni correction
180. A more exact solution: Sidak correction
181. A higher power solution: the Holm–Bonferroni correction
182. Adjusting ? reduces statistical power
183. Controlling the false discovery rate
184. Comparison of FDR vs FWER correction
185. Cluster correction for contiguous measurements
186. Example of cluster correction for EEG data
187. Correcting for multiple comparisons in R
188. Implementing cluster correction in R
189. Practice questions
190. 16 Signal detection theory
191. The curious world of chicken sexing
192. Hits, misses, false alarms, and correct rejections
193. Internal responses and decision criteria
194. Calculating sensitivity and bias
195. Radiology example: rating scales and ROC curves
196. Removing bias using forced choice paradigms
197. Manipulating stimulus intensity
198. Type II signal detection theory (metacognition)
199. Practical problems with ceiling performance
200. Calculating in R
201. Practice questions
202. 17 Bayesian statistics
203. The philosophy of frequentist statistics
204. An unfortunate consequence of the fixed Type I error rate
205. Bayesian statistics: an alternative approach
206. The legacy of Thomas Bayes: Reverend
207. Bayes’ theorem
208. Probability distributions
209. The Bayesian approach to statistical inference
210. Heuristics for Bayes factor scores
211. Bayes factors can support the null hypothesis
212. Bayesian implementations of different statistical tests
213. So which approach is the best?
214. Software for performing Bayesian analyses
215. Calculating Bayes factors in R using the BayesFactor package
216. Further resources on Bayesian methods
217. Practice questions
218. 18 Plotting graphs and data visualization
219. Four principles of clear data visualization
220. Different conditions should be maximally distinguishable
221. Axes should be labelled and span an informative range
222. A measure of variability should always be included
223. Where possible, include data at the finest meaningful level
224. Choosing colour palettes
225. Palettes that are safe for colour-blind individuals
226. Perceptually uniform palettes
227. Building plots from scratch in R
228. Adding data to plots
229. Setting alpha transparency for points and shapes
230. Choosing, checking, and using colour palettes
231. Saving graphs automatically
232. Combining multiple graphs
233. Adding raster images to a plot
234. Practice questions
235. 19 Reproducible data analysis
236. Version control of analysis scripts
237. Writing code for others to read
238. Using R Markdown to combine writing and analysis
239. Automated package installation
240. Identifying a robust data repository
241. Automatically uploading to and downloading from OSF
242. Future-proofing with open data formats
243. Providing informative metadata
244. Practice questions
245. A parting note
246. Answers to practice questions
247. Chapter 2
248. Chapter 3
249. Chapter 4
250. Chapter 5
251. Chapter 6
252. Chapter 7
253. Chapter 8
254. Chapter 9
255. Chapter 10
256. Chapter 11
257. Chapter 12
258. Chapter 13
259. Chapter 14
260. Chapter 15
261. Chapter 16
262. Chapter 17
263. Chapter 18
264. Chapter 19
265. Alphabetical list of key R packages used in this book
266. References
267. Index
2. Title Page
3. Copyright page
4. Acknowledgements
5. Table of Contents
6. 1 Introduction
7. What is this book about?
8. Who will find this book useful?
9. Topics covered
10. Some words of caution
11. Implementation in R
12. History
13. 2 Introduction to the R environment
14. What is R?
15. RStudio
16. Finding your way around RStudio
17. Customizing RStudio for your own needs
18. Scripts
19. Data objects
20. Functions
21. Packages
22. Conditional statements
23. Loops
24. Importing data
25. How to find out how to do something
26. Table of useful core R functions
27. Practice questions
28. 3 Cleaning and preparing data for analysis
29. Why do data need to be ‘cleaned’?
30. Organizing data in wide and long formats
31. Inspecting data: histograms and scatterplots
32. Identifying outliers objectively
33. Tukey’s ‘fence’ method
34. Standard deviations and related criteria
35. The Mahalanobis distance for multivariate data
36. Identifying missing and out-of-range values
37. What should we do with outliers?
38. Normalizing and rescaling data
39. Transforming data and testing assumptions
40. Recoding categorical data and assigning factor labels
41. Putting it all together—importing and cleaning some real data
42. Practice questions
43. 4 Statistical tests as linear models
44. Many statistical tests involve comparing different models
45. Regression (and correlation)
46. T-tests
47. ANOVA
48. Assumptions of linear models
49. Is everything just a linear model then?
50. Practice questions
51. 5 Power analysis
52. What is statistical power?
53. Effect size
54. How can we estimate effect size?
55. Power curves
56. Problems with low power
57. Problems with high power
58. Measurement precision impacts power
59. Reporting the results of a power analysis
60. Post-hoc power analysis
61. Doing power analysis in R
62. Practice questions
63. 6 Meta-analysis
64. Why is meta-analysis important?
65. Designing a meta-analysis
66. Conducting and summarizing a literature search
67. Different measures of effect size
68. Converting between effect sizes
69. Fixed and random effects
70. Forest plots
71. Weighted averaging
72. Publication bias and funnel plots
73. Some example meta-analyses
74. Calculating and converting effect sizes in R
75. Conducting a meta-analysis in R
76. Practice questions
77. 7 Mixed-effects models
78. Different types of mixed-effects model
79. Mixed-effects regression example: lung function in bottlenose dolphins
80. Factorial mixed-effects example: lexical decision task for nouns and verbs
81. How can I decide if an effect is fixed or random?
82. Dealing elegantly with missing data and unequal groups
83. Reporting and comparing mixed-effects models
84. Practical problems with model convergence
85. Running mixed-effects models in R with lmerTest
86. Further resources for mixed-effects models
87. Practice questions
88. 8 Stochastic methods
89. What does stochastic mean?
90. Ways of generating random numbers
91. Part 1: Using random numbers to find stuff out
92. Stochastic simulations: models and synthetic data
93. Generating random numbers in R from different distributions
94. Part 2: Resampling methods
95. Resampling with and without replacement
96. Using resampling for hypothesis testing
97. How to do resampling in R
98. Further reading
99. Practice questions
100. 9 Non-linear curve fitting
101. Fitting models to data
102. Linear models
103. Non-linear models
104. A practical example: exponential modelling of disease contagion
105. Parameter spaces and the combinatorial explosion
106. Optimization algorithms
107. The downhill simplex algorithm
108. Local minima
109. Some practical considerations
110. Two philosophical approaches in model fitting
111. Tools to help with model development
112. How to fit curves to data in R
113. Practice questions
114. 10 Fourier analysis
115. Joseph Fourier: polymath
116. Example applications
117. Terminology
118. The amplitude spectrum
119. The phase spectrum
120. Limitations on sampling: the Nyquist limit and frequency resolution
121. Example: bat species identification by frequency
122. Fourier analysis in two dimensions
123. Example: using 2D Fourier analysis to measure goosebumps
124. Filtering: altering signals in the Fourier domain
125. Stimulus construction in the Fourier domain
126. Doing Fourier analysis in R
127. Practice questions
128. 11 Multivariate t-tests
129. Thinking about and visualizing bivariate data
130. The one-sample and paired Hotelling’s statistic
131. Example: multivariate analysis of periodic EEG data
132. The two-sample (independent) Hotelling’s statistic
133. Example: visual motor responses in zebrafish larvae
134. The statistic
135. Mahalanobis distance as an effect size measure for multivariate statistics
136. Calculating Hotelling’s T2 in R
137. Practice questions
138. 12 Structural equation modelling
139. How are different mental abilities related?
140. Testing hypotheses using data with structural equation modelling
141. SEM stage 1: model specification
142. SEM stage 2: model identification
143. SEM stage 3: model evaluation
144. SEM stage 4: model modification
145. Comparing different models
146. Cross-validation on fresh data sets
147. Power and SEM
148. Dealing with missing data
149. Doing SEM in R using the lavaan package
150. Practice questions
151. 13 Multidimensional scaling and k-means clustering
152. The k-means clustering algorithm
153. Comparing different numbers of clusters
154. Example: k-means clustering of dinosaur species
155. Variants of k-means clustering
156. The multidimensional scaling algorithm
157. Metric vs non-metric MDS
158. Example: multidimensional scaling of viruses
159. Combining k-means clustering and MDS
160. Normalizing multivariate data
161. Examples from the literature of k-means clustering and MDS
162. Doing k-means clustering in R
163. Doing multidimensional scaling in R
164. Practice questions
165. 14 Multivariate pattern analysis
166. Why use machines?
167. Predicting group membership
168. Different types of classifier algorithm and pattern analysis
169. Situations with more than two categories
170. Preparing data for analysis
171. Assessing statistical significance
172. Ethical issues with machine learning and classification
173. Doing MVPA in R using the Caret package
174. Categorizing cell body segmentation
175. Decoding fMRI data
176. Practice questions
177. 15 Correcting for multiple comparisons
178. The problem of multiple comparisons
179. The traditional solution: Bonferroni correction
180. A more exact solution: Sidak correction
181. A higher power solution: the Holm–Bonferroni correction
182. Adjusting ? reduces statistical power
183. Controlling the false discovery rate
184. Comparison of FDR vs FWER correction
185. Cluster correction for contiguous measurements
186. Example of cluster correction for EEG data
187. Correcting for multiple comparisons in R
188. Implementing cluster correction in R
189. Practice questions
190. 16 Signal detection theory
191. The curious world of chicken sexing
192. Hits, misses, false alarms, and correct rejections
193. Internal responses and decision criteria
194. Calculating sensitivity and bias
195. Radiology example: rating scales and ROC curves
196. Removing bias using forced choice paradigms
197. Manipulating stimulus intensity
198. Type II signal detection theory (metacognition)
199. Practical problems with ceiling performance
200. Calculating in R
201. Practice questions
202. 17 Bayesian statistics
203. The philosophy of frequentist statistics
204. An unfortunate consequence of the fixed Type I error rate
205. Bayesian statistics: an alternative approach
206. The legacy of Thomas Bayes: Reverend
207. Bayes’ theorem
208. Probability distributions
209. The Bayesian approach to statistical inference
210. Heuristics for Bayes factor scores
211. Bayes factors can support the null hypothesis
212. Bayesian implementations of different statistical tests
213. So which approach is the best?
214. Software for performing Bayesian analyses
215. Calculating Bayes factors in R using the BayesFactor package
216. Further resources on Bayesian methods
217. Practice questions
218. 18 Plotting graphs and data visualization
219. Four principles of clear data visualization
220. Different conditions should be maximally distinguishable
221. Axes should be labelled and span an informative range
222. A measure of variability should always be included
223. Where possible, include data at the finest meaningful level
224. Choosing colour palettes
225. Palettes that are safe for colour-blind individuals
226. Perceptually uniform palettes
227. Building plots from scratch in R
228. Adding data to plots
229. Setting alpha transparency for points and shapes
230. Choosing, checking, and using colour palettes
231. Saving graphs automatically
232. Combining multiple graphs
233. Adding raster images to a plot
234. Practice questions
235. 19 Reproducible data analysis
236. Version control of analysis scripts
237. Writing code for others to read
238. Using R Markdown to combine writing and analysis
239. Automated package installation
240. Identifying a robust data repository
241. Automatically uploading to and downloading from OSF
242. Future-proofing with open data formats
243. Providing informative metadata
244. Practice questions
245. A parting note
246. Answers to practice questions
247. Chapter 2
248. Chapter 3
249. Chapter 4
250. Chapter 5
251. Chapter 6
252. Chapter 7
253. Chapter 8
254. Chapter 9
255. Chapter 10
256. Chapter 11
257. Chapter 12
258. Chapter 13
259. Chapter 14
260. Chapter 15
261. Chapter 16
262. Chapter 17
263. Chapter 18
264. Chapter 19
265. Alphabetical list of key R packages used in this book
266. References
267. Index
ISBN: 9780192649799
ISBN-10: 0192649795
Published: 6th April 2022
Format: ePUB
Language: English
Publisher: Oxford University Press Academic UK
























