Learning Statistics with R - A tutorial for Psychology Students and other Beginners

by DJ Navarro

Learning Statistics with R covers the contents of an introductory statistics class, as typically taught to undergraduate psychology students, focusing on the use of the R statistical software. The book discusses descriptive statistics and graphing first, followed by chapters on probability theory, sampling and estimation, and null hypothesis testing. Then the book covers the analysis of contingency tables, t-tests, ANOVAs and regression. Bayesian statistics are covered afterward.

Description from LibreTexts.

Publisher
University of New South Wales
Subjects
Statistics, Applied Statistics
Licence
CC BY-SA 4.0, as LibreTexts states it
Who can read
Tweens profiles and older, judged from its title and subjects

Contents

LibreTexts writes equations in TeX, and here they show as TeX; the PDF has them typeset.

  1. Front Matter
  2. TitlePage
  3. InfoPage
  4. Table of Contents
  5. Licensing
  6. 1: Why Do We Learn Statistics?
  7. 1.1: On the Psychology of Statistics
  8. 1.2: The Cautionary Tale of Simpson’s Paradox
  9. 1.3: Statistics in Psychology
  10. 1.4: Statistics in Everyday Life
  11. 1.5: There’s More to Research Methods Than Statistics
  12. 2: A Brief Introduction to Research Design
  13. 2.1: Introduction to Psychological Measurement
  14. 2.2: Scales of Measurement
  15. 2.3: Assessing the Reliability of a Measurement
  16. 2.4: The “Role” of Variables- Predictors and Outcomes
  17. 2.5: Experimental and Non-experimental Research
  18. 2.6: Assessing the Validity of a Study
  19. 2.7: Confounds, Artifacts and Other Threats to Validity
  20. 2.8: Summary
  21. 3: Getting Started with R
  22. 3.1: Installing R
  23. 3.2: Typing Commands at the R Console
  24. 3.3: Doing Simple Calculations with R
  25. 3.4: Storing a Number As a Variable
  26. 3.5: Using Functions to Do Calculations
  27. 3.6: Letting RStudio Help You with Your Commands
  28. 3.7: Storing Many Numbers As a Vector
  29. 3.8: Storing Text Data
  30. 3.9: Storing “True or False” Data
  31. 3.10: Indexing Vectors
  32. 3.11: Quitting R
  33. 3.12: Summary
  34. 4: Additional R Concepts
  35. 4.1: Using Comments
  36. 4.2: Installing and Loading Packages
  37. 4.3: Managing the Workspace
  38. 4.4: Navigating the File System
  39. 4.5: Loading and Saving Data
  40. 4.6: Useful Things to Know about Variables
  41. 4.7: Factors
  42. 4.8: Data frames
  43. 4.9: Lists
  44. 4.10: Formulas
  45. 4.11: Generic Functions
  46. 4.12: Getting help
  47. 4.13: Summary
  48. 5: Descriptive Statistics
  49. 5.1: Measures of Central Tendency
  50. 5.2: Measures of Variability
  51. 5.3: Skew and Kurtosis
  52. 5.4: Getting an Overall Summary of a Variable
  53. 5.5: Descriptive Statistics Separately for each Group
  54. 5.6: Standard Scores
  55. 5.7: Correlations
  56. 5.8: Handling Missing Values
  57. 5.9: Summary
  58. 5.10: Epilogue- Good Descriptive Statistics Are Descriptive!
  59. 6: Drawing Graphs
  60. 6.1: An Overview of R Graphics
  61. 6.2: An Introduction to Plotting
  62. 6.3: Histograms
  63. 6.4: Stem and Leaf Plots
  64. 6.5: Boxplots
  65. 6.6: Scatterplots
  66. 6.7: Bar Graphs
  67. 6.8: Saving Image Files Using R and Rstudio
  68. 6.9: Summary
  69. 7: Pragmatic Matters
  70. 7.1: Tabulating and Cross-tabulating Data
  71. 7.2: Transforming and Recoding a Variable
  72. 7.3: A few More Mathematical Functions and Operations
  73. 7.4: Extracting a Subset of a Vector
  74. 7.5: Extracting a Subset of a Data Frame
  75. 7.6: Sorting, Flipping and Merging Data
  76. 7.7: Reshaping a Data Frame
  77. 7.8: Working with Text
  78. 7.9: Reading Unusual Data Files
  79. 7.10: Coercing Data from One Class to Another
  80. 7.11: Other Useful Data Structures
  81. 7.12: Miscellaneous Topics
  82. 7.13: Summary
  83. 8: Basic Programming
  84. 8.1: Scripts
  85. 8.2: Loops
  86. 8.3: Conditional Statements
  87. 8.4: Writing Functions
  88. 8.5: Implicit Loops
  89. 8.6: Summary
  90. 9: Introduction to Probability
  91. 9.1: How are Probability and Statistics Different?
  92. 9.2: What Does Probability Mean?
  93. 9.3: Basic Probability Theory
  94. 9.4: The Binomial Distribution
  95. 9.5: The Normal Distribution
  96. 9.6: Other Useful Distributions
  97. 9.7: Summary
  98. 10: Estimating Unknown Quantities from a Sample
  99. 10.1: Samples, Populations and Sampling
  100. 10.2: The Law of Large Numbers
  101. 10.3: Sampling Distributions and the Central Limit Theorem
  102. 10.4: Estimating Population Parameters
  103. 10.5: Estimating a Confidence Interval
  104. 10.6: Summary
  105. 11: Hypothesis Testing
  106. 11.1: A Menagerie of Hypotheses
  107. 11.2: Two Types of Errors
  108. 11.3: Test Statistics and Sampling Distributions
  109. 11.4: Making Decisions
  110. 11.5: The p value of a test
  111. 11.6: Reporting the Results of a Hypothesis Test
  112. 11.7: Running the Hypothesis Test in Practice
  113. 11.8: Effect Size, Sample Size and Power
  114. 11.9: Some Issues to Consider
  115. 11.10: Summary
  116. 12: Categorical Data Analysis
  117. 12.1: The χ2 Goodness-of-fit Test
  118. 12.2: The χ2 test of independence (or association)
  119. 12.3: The Continuity Correction
  120. 12.4: Effect Size
  121. 12.5: Assumptions of the Test(s)
  122. 12.6: The Most Typical Way to Do Chi-square Tests in R
  123. 12.7: The Fisher Exact Test
  124. 12.8: The McNemar Test
  125. 12.9: What’s the Difference Between McNemar and Independence?
  126. 12.10: Summary
  127. 13: Comparing Two Means
  128. 13.1: The one-sample z-test
  129. 13.2: The One-sample t-test
  130. 13.3: The Independent Samples t-test (Student Test)
  131. 13.4: The Independent Samples t-test (Welch Test)
  132. 13.5: The Paired-samples t-test
  133. 13.6: One Sided Tests
  134. 13.7: Using the t.test() Function
  135. 13.8: Effect Size
  136. 13.9: Checking the Normality of a Sample
  137. 13.10: Testing Non-normal Data with Wilcoxon Tests
  138. 13.11: Summary
  139. 14: Comparing Several Means (One-way ANOVA)
  140. 14.1: Summary
  141. 14.2: An Illustrative Data Set
  142. 14.3: How ANOVA Works
  143. 14.4: Running an ANOVA in R
  144. 14.5: Effect Size
  145. 14.6: Multiple Comparisons and Post Hoc Tests
  146. 14.7: Assumptions of One-way ANOVA
  147. 14.8: Checking the Homogeneity of Variance Assumption
  148. 14.9: Removing the Homogeneity of Variance Assumption
  149. 14.10: Checking the Normality Assumption
  150. 14.11: Removing the Normality Assumption
  151. 14.12: On the Relationship Between ANOVA and the Student t Test
  152. 15: Linear Regression
  153. 15.1: What Is a Linear Regression Model?
  154. 15.2: Estimating a Linear Regression Model
  155. 15.3: Multiple Linear Regression
  156. 15.4: Quantifying the Fit of the Regression Model
  157. 15.5: Hypothesis Tests for Regression Models
  158. 15.6: Testing the Significance of a Correlation
  159. 15.7: Regarding Regression Coefficients
  160. 15.8: Assumptions of Regression
  161. 15.9: Model Checking
  162. 15.10: Model Selection
  163. 15.11: Summary
  164. 16: Factorial ANOVA
  165. 16.1: Factorial ANOVA 1- Balanced Designs, No Interactions
  166. 16.2: Factorial ANOVA 2- Balanced Designs, Interactions Allowed
  167. 16.3: Effect Size, Estimated Means, and Confidence Intervals
  168. 16.4: Assumption Checking
  169. 16.5: The F test as a model comparison
  170. 16.6: ANOVA As a Linear Model
  171. 16.7: Different Ways to Specify Contrasts
  172. 16.8: Post Hoc Tests
  173. 16.9: The Method of Planned Comparisons
  174. 16.10: Factorial ANOVA 3- Unbalanced Designs
  175. 16.11: Summary
  176. 17: Bayesian Statistics
  177. 17.1: Probabilistic Reasoning by Rational Agents
  178. 17.2: Bayesian Hypothesis Tests
  179. 17.3: Why Be a Bayesian?
  180. 17.4: Evidentiary Standards You Can Believe
  181. 17.5: The p-value Is a Lie.
  182. 17.6: Bayesian Analysis of Contingency Tables
  183. 17.7: Bayesian t-tests
  184. 17.8: Bayesian Regression
  185. 17.9: Bayesian ANOVA
  186. 17.10: Summary
  187. 18: Epilogue
  188. 18.1: The Undiscovered Statistics
  189. 18.2: Statistical Models Missing from the Book
  190. 18.3: Learning the Basics, and Learning Them in R
  191. 18.4: Other Ways of Doing Inference
  192. 18.5: Section 5-
  193. 18.6: Section 6-
  194. Back Matter
  195. Index
  196. Glossary
  197. Detailed Licensing