ebook img

Statistics for Linguists: An Introduction Using R PDF

327 Pages·2020·46.593 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Statistics for Linguists: An Introduction Using R

Statistics for Linguists: An Introduction Using R Statistics for Linguists: An Introduction Using R is the first statistics textbook on linear models for linguistics. The book covers simple uses of linear models through generalized models to more advanced approaches, maintaining its focus on conceptual issues and avoiding excessive mathematical details. It contains many applied examples using the R statistical programming environment. Written in an accessible tone and style, this text is the ideal main resource for graduate and advanced undergraduate students of Linguistics statistics courses as well as those in other fields, including Psychology, Cognitive Science, and Data Science. Bodo Winter is Lecturer in Cognitive Linguistics in the Department of English Language and Applied Linguistics at the University of Birmingham, UK. Taylor& Francis Taylor & Francis Group hltpi/t.iylorandfrancis.com Statistics for Linguists: An Introduction Using R Bodo Winter NEW YORK AND LONDON First published 2020 by Routledge 52 Vanderbilt Avenue, New York, NY 10017 and by Routledge 2 Park Square, Milton Park,Abingdon, Oxon, OXl4 4RN Routledge is an imprint of the Taylor & Francis Group, an informa business © 2020 Taylor & Francis The right of Bodo Winter to be identified as author of this work has been asserted by him in accordance with sections 77 and 78 of the Copyright, Designs and Patents Act 1988. All rights reserved. No part of this book may be reprinted or reproduced or utilized in any form or by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying and recording, or in any information storage or retrieval system, without permission in writing from the publishers. Trademark notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe. Library of Congress Cataloging-in-Publication Data Names: Winter, Bodo, author. Title: Statistics for linguists : an introduction using RI by Bodo Winter. Description: New York, NY: Routledge, 2019. I Includes bibliographical references and index. I I Identifiers: LCCN 2019029350 (print) LCCN 2019029351 (ebook) I I ISBN 9781138056084 (hbk) ISBN 9781138056091 (pbk) lSBN 9781315165547 (ebk) I Subjects: LCSH: Linguistics-Statistical methods. R (Computer program I language) Mathematical Linguistics. I I Classification: LCC P138.5 . W562019 (print) LCC PI 38.5 (ebook) DDC 4l0.l/5195-dc23 LC record available at https://lccn.loc.gov/20 I 9029350 LC ebook record available at https://lccn.loc.gov/2019029351 ISBN: 978-1-138-05608-4 (hbk) ISBN: 978-1-138-05609-I (pbk) ISBN: 978-1-315-16554-7 (ebk) Typeset in Times New Roman by Apex Co Vantage, LLC Contents Acknowledgments X 0. Preface: Approach and How to Use This Book XU 0.1. Strategy of the Book xii 0.2. Why R? xiii 0.3. Why the Tidyverse? xiv 0.4. R Packages Required for This Book xv 0.5. What This Book Is Not xv 0.6. How to Use This Book xv 0. 7. Information for Teachers xvi 1 Introduction to R 1 1.1. Introduction I 1.2. Baby Steps: Simple Math with R 2 1.3. Your First R Script 4 1.4. Assigning Variables 5 1.5. Numeric Vectors 7 1.6. Indexing 9 1.7. Logical Vectors I 0 1.8. Character Vectors 11 1.9. Factor Vectors 12 1.10. Data Frames 13 I.II. Loading in Files 16 1.12. Plotting 19 1.13. Installing, Loading, and Citing Packages 20 1.14. Seeking Help 21 1.15. A Note on Keyboard Shortcuts 22 I.I 6. Your R Journey: The Road Ahead 23 2 The Tidyverse and Reproducible R Workflows 27 2.1. Introduction 27 2.2. tibble and readr 28 2.3. dplyr 30 2.4. ggplot2 34 2.5. Piping with magri ttr 36 2.6. A More Extensive Example: Iconicity and the Senses 37 v1 Contents 2. 7. R Markdown 44 2.8. Folder Structure for Analysis Projects 45 2.9. Readme Files and More Markdown 46 2.10. Open and Reproducible Research 47 3 Descriptive Statistics, Models, and Distributions 53 3.1. Models 53 3.2. Distributions 53 3.3. The Normal Distribution 54 3. 4. Thinking of the Mean as a Model 57 3.5. Other Summary Statistics: Median and Range 58 3.6. Boxplots and the Interquartile Range 59 3. 7. Summary Statistics in R 60 3. 8. Exploring the Emotional Valence Ratings 64 3.9. Chapter Conclusions 67 4 Introduction to the Linear Model: Simple Linear Regression 69 4.1. Word Frequency Effects 69 4.2. Intercepts and Slopes 71 4.3. Fitted Values and Residuals 72 4.4. Assumptions: Normality and Constant Variance 74 4.5. Measuring Model Fit with R^274 4. 6. A Simple Linear Model in R 77 4.7. Linear Models with Tidyverse Functions 82 4.8. Model Formula Notation: Intercept Placeholders 83 4.9. Chapter Conclusions 84 5 Correlation, Linear, and Nonlinear Transformations 86 5.1. Centering 86 5.2. Standardizing 87 5.3. Correlation 89 5.4. Using Logarithms to Describe Magnitudes 90 5.5. Example: Response Durations and Word Frequency 94 5.6. Centering and Standardization in R 98 5.7. Terminological Note on the Term 'Normalizing' 101 5.8. Chapter Conclusions 101 6 Multiple Regression 103 6.1. Regression with More Than One Predictor 103 6.2. Multiple Regression with Standardized Coefficients I 05 6.3. Assessing Assumptions 109 6.4 . Collinearity 112 6.5. AdjustedR 2 115 6.6. Chapter Conclusions 116 Contents vii 7 Categorical Predictors 117 7.1. Introduction 117 7.2. Modeling the Emotional Valence oJTaste and Smell Words 117 7.3. Processing the Taste and Smell Data 119 7.4. Treatment Coding in R 122 7.5. Doing Dummy Coding 'By Hand' 123 7.6. Changing the Reference Level 124 7.7 . Sum-coding in R 125 7.8 . Categorical Predictors with More Than Two Levels 12 7 7.9. Assumptions Again 129 7.10. Other Coding Schemes 13 0 7.11. Chapter Conclusions 131 8 Interactions and Nonlinear Effects 133 8.1. Introduction 133 * 8.2. Categorical Continuous Interactions 134 8.3. Categorical* Categorical Interactions 139 8.4. Continuous* Continuous Interactions 146 8.5. Nonlinear Effects 150 8.6. Higher-Order Interactions 155 8. 7. Chapter Conclusions 156 9 Inferential Statistics 1: Significance Testing 157 9.1. Introduction 157 9.2. Effect Size: Cohen's d 159 9.3. Cohen's din R 161 9. 4. Standard Errors and Confidence Intervals 162 9.5. Null Hypotheses 165 9.6. Using t to Measure the Incompatibility with the Null Hypothesis 166 9. 7. Using the t-Distribution to Compute p-Values 167 9. 8. Chapter Conclusions 169 10 Inferential Statistics 2: Issues in Significance Testing 171 JO.I. Common Misinterpretations of p-Values 171 10.2. Statistical Power and Type I II, M, and S Errors 171 10.3. Multiple Testing 175 10.4 . Stopping rules 177 10.5. Chapter Conclusions 178 11 Inferential Statistics 3: Significance Testing in a Regression Context 180 11.1. Introduction 180 11.2. Standard Errors and Confidence Intervals for Regression Coefficients 180 11.3 . Significance Tests with Multilevel Categorical Predictors 184 Contents v111 11.4. Another Example: The Absolute Valence of Taste and Smell Words 188 11.5. Communicating Uncertainty for Categorical Predictors 190 11.6 . Communicating Uncertainty for Continuous Predictors 194 11.7 . Chapter Conclusions 197 12 Generalized Linear Models 1: Logistic Regression 198 12.1. Motivating Generalized Linear Models 198 12.2 . Theoretical Background: Data-Generating Processes 198 12.3. The Log Odds Function and Interpreting Logits 202 12.4 . Speech Errors and Blood Alcohol Concentration 204 12.5. Predicting the Dative Alternation 207 12.6. Analyzing Gesture Perception 210 12. 7. Chapter Conclusions 216 13 Generalized Linear Models 2: Poisson Regression 218 13.1. Motivating Poisson Regression 218 13.2. The Poisson Distribution 218 13.3. Analyzing Linguistic Diversity Using Poisson Regression 220 13.4. Adding Exposure Variables 225 13.5. Negative Binomial Regression for Overdispersed Count Data 227 13. 6. Overview and Summary of the Generalized Linear Model Framework 229 13. 7. Chapter Conclusions 230 14 Mixed Models 1: Conceptual Introduction 232 14.1. Introduction 232 14.2. The Independence Assumption 232 14.3. Dealing with Non-independence via Experimental Design and Averaging 233 14.4. Mixed Models: Varying Intercepts and Varying Slopes 234 14.5. More on Varying Intercepts and Varying Slopes 237 14. 6. Interpreting Random Effects and Random Effect Correlations 238 14. 7. Specifying Mixed Effects Models: lme4 syntax 240 14.8. Reasoning About Your Mixed Model: The Importance of Varying Slopes 241 14.9. Chapter Conclusions 244 15 Mixed Models 2: Extended Example, Significance Testing, Convergence Issues 245 15.1. Introduction 245 15.2. Simulating Vowel Durations for a Mixed Model Analysis 245 Contents ix 15. 3. Analyzing the Simulated Vowel Durations with Mixed Models 253 15.4. Extracting Information out of lme4 Objects 255 15.5. Messing up the Model 257 15. 6. Likelihood Ratio Tests 260 15. 7. Remaining Issues 264 15.8. Mixed Logistic Regression: Ugly Selfies 267 15.9 . Shrinkage and Individual Differences 271 15.10. Chapter Conclusions 272 16 Outlook and Strategies for Model Building 274 16.1. What You Have Learned So Far 2 74 16.2. Model Choice 275 16.3. The CookbookApproach 275 16.4. Stepwise Regression 276 16.5. A Plea for Subjective and Theory-Driven Statistical Modeling 277 16. 6. Reproducible Research 279 16. 7. Closing Words 280 References 281 Appendix A. Correspondences Between Significance Tests and Linear Models 290 Al. t-Tests 290 A2. Testsf or Categorical Data 295 A3. Other Tests 299 Appendix B. Reading Recommendations 301 Bl. Book Recommendations 301 B2. Article Recommendations 302 B3. Staying Up-to-Date 303 Index 304 Index of R Functions 308

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.