# Introductory Statistics with R

Textbook

Part of the Statistics and Computing book series (SCO)

1. Front Matter
Pages i-xv
2. Pages 1-44
3. Pages 45-55
4. Pages 57-80
5. Pages 81-93
6. Pages 95-110
7. Pages 111-127
8. Pages 129-138
9. Pages 139-147
10. Pages 149-158
11. Pages 159-189
12. Pages 191-209
13. Pages 211-220
14. Back Matter
Pages 221-267

### Introduction

R is an Open Source implementation of the S language. It works on multiple computing platforms and can be freely downloaded. R is now in widespread use for teaching at many levels as well as for practical data analysis and methodological development.

This book provides an elementary-level introduction to R, targeting both non-statistician scientists in various fields and students of statistics. The main mode of presentation is via code examples with liberal commenting of the code and the output, from the computational as well as the statistical viewpoint. A supplementary R package can be downloaded and contains the data sets.

The statistical methodology includes statistical standard distributions, one- and two-sample tests with continuous data, regression analysis, one- and two-way analysis of variance, regression analysis, analysis of tabular data, and sample size calculations. In addition, the last six chapters contain introductions to multiple linear regression analysis, linear models in general, logistic regression, survival analysis, Poisson regression, and nonlinear regression.

In the second edition, the text and code have been updated to R version 2.6.2. The last two methodological chapters are new, as is a chapter on advanced data handling. The introductory chapter has been extended and reorganized as two chapters. Exercises have been revised and answers are now provided in an Appendix.

Peter Dalgaard is associate professor at the Department of Biostatistics at the University of Copenhagen and has extensive experience in teaching within the PhD curriculum at the Faculty of Health Sciences. He has been a member of the R Core Team since 1997.

### Keywords

ANOVA Descriptive statistics Fitting Logistic Regression Regression analysis Survival analysis Variance analysis of variance correlation data analysis linear regression

#### Authors and affiliations

1. 1.Department of BiostasticsUniversity of CopenhagenCph. N CopenhagenDenmark

Peter Dalgaard is associate professor at the Biostatistical Department at the University of Copenhagen and has extensive experience in teaching within the PhD curriculum at the Faculty of Health Sciences. He was chairman of the Danish Society for Theoretical Statistics from 1996 to 2000. Peter Dalgaard has been a key member of the R Core Team since August 1997 and is well known among R users for his activity on

### Bibliographic information

• Book Title Introductory Statistics with R
• Authors Peter Dalgaard
• Series Title Statistics and Computing
• DOI https://doi.org/10.1007/b97671
• Copyright Information Springer-Verlag New York, Inc. 2002
• Publisher Name Springer, New York, NY
• eBook Packages
• Softcover ISBN 978-0-387-95475-2
• eBook ISBN 978-0-387-22632-3
• Series ISSN 1431-8784
• Edition Number 1
• Number of Pages XV, 267
• Number of Illustrations 0 b/w illustrations, 0 illustrations in colour
• Topics
• Buy this book on publisher's site

## Reviews

From reviews of the first edition:

TECHNOMETRICS

"…extensive, well organized, and well documented…The book is an elegant R companion, suitable for the statistically initiated who want to program their own analyses. For experienced statisticians and data analysts, the book provides a good overview of the basic statistical analysis capabilities of R and presumably prepares readers for later migration to S…The format of this compact book is attractive…The book makes excellent use of fonts and intersperses graphics near the codes that produced them. Output from each procedure is dissected line by line to link R code with the computed result…I can recommend [this book] to its target audience. The author provides an excellent overview of R. I found the wealth of clear examples educational and a practical way to preview both R and S."

"The scope of the book, introductory statistics, is a very useful set of methods in parametric and non-parametric statistics up to logistic regression and survival analysis. … Where many constructs in R are very attractive for mathematical oriented users, e.g. matrices, Dalgaard succeeded in convincing me that with little extra effort they can be made very useful to less mathematically oriented people, e.g. by specifying row and column names, and proposing quite attractive ways to specify for example ‘subsets’ of rows and columns." (Dr. H. W. M. Hendriks, Kwantitatieve Methoden, Vol. 72B8, 2003)

"R is an Open Source implementation of the well-known S language. It works on multiple computing platforms and can be freely downloaded. R is thus ideally suited for teaching at many levels as well as for practical data analysis and methodological development. This book provides an elementary-level introduction to R, targeting both non-statistician scientists in various fields and students of statistics. … Brief sections introduce the statistical methods before they are used. A supplementary R package can be downloaded and contains the data sets." (Zentralblatt für Didaktik der Mathematik, August, 2004)

"This is a nice book on statistical methods and statistical computing in R, a language and environment for statistical computing and graphs: this dialect of the S language is available as free software through internet. … Explanation of statistical methods, together with an interpretation of statistical concepts, is the prevailing style of the text. They are illustrated by plenty of practical examples, all computed using R. This book will be useful for novices in applied statistics or in computing in R." (European Mathematical Society Newsletter, September, 2003)

"The book is an elegant R companion, suitable for the statistically initiated who want to program their own analyses. For experienced statisticians and data analysts, the book provides a good overview of the basic statistical analysis capabilities of R … prepares readers for later migration to S. … I can recommend Introductory Statistics With R to its target audience. The author provides an excellent overview of R. I found the wealth of clear examples educational and a practical way to preview both R and S." (Thomas D. Sandry, Technometrics, Vol. 45 (3), 2003)

"R is both a statistical computer environment and a programming language designed to perform statistical analysis and to produce adequate corresponding graphics. … The present book is … a very useful guide for introducing a number of basic concepts and techniques necessary to practical statistics, covering both elementary statistics and actual programming in the R language. The book is organized in 12 chapters and three appendices, each chapter ending with a beneficial section of proposed exercises." (Silvia Curteanu, Zentralblatt MATH, Vol. 1006, 2003)