Book contents
- Frontmatter
- Contents
- Preface to the second edition
- Preface to the first edition
- 1 Getting started
- 2 Introduction to the R language
- 3 Programming statistical graphics
- 4 Programming with R
- 5 Simulation
- 6 Computational linear algebra
- 7 Numerical optimization
- Appendix Review of random variables and distributions
- Index
1 - Getting started
Published online by Cambridge University Press: 05 July 2016
- Frontmatter
- Contents
- Preface to the second edition
- Preface to the first edition
- 1 Getting started
- 2 Introduction to the R language
- 3 Programming statistical graphics
- 4 Programming with R
- 5 Simulation
- 6 Computational linear algebra
- 7 Numerical optimization
- Appendix Review of random variables and distributions
- Index
Summary
Getting started
Welcome to the world of statistical programming. This book contains a lot of specific advice about the hows and whys of the subject. We start in this chapter by giving you an idea of what statistical programming is all about. We will also tell you what to expect as you proceed through the rest of the book. The chapter will finish with some instructions about how to download and install R, the software package and language on which we base our programming examples, and RStudio, an “integrated development environment” (or “IDE”) for R.
What is statistical programming?
Computer programming involves controlling computers, telling them what calculations to do, what to display, etc. Statistical programming is harder to define. One definition might be that it's the kind of computer programming statisticians do – but statisticians do all sorts of programming. Another would be that it's the kind of programming one does when one is doing statistics: but again, statistics involves a wide variety of computing tasks.
For example, statisticians are concerned with collecting and analyzing data, and some statisticians would be involved in setting up connections between computers and laboratory instruments: but we would not call that statistical programming. Statisticians often oversee data entry from questionnaires, and may set up programs to aid in detecting data entry errors. That is statistical programming, but it is quite specialized, and beyond the scope of this book.
Statistical programming involves doing computations to aid in statistical analysis. For example, data must be summarized and displayed. Models must be fit to data, and the results displayed. These tasks can be done in a number of different computer applications: Microsoft Excel, SAS, SPSS, S-PLUS, R, Stata, etc. Using these applications is certainly statistical computing, and usually involves statistical programming, but it is not the focus of this book. In this book our aim is to provide a foundation for an understanding of how those applications work: what are the calculations they do, and how could you do them yourself?
Since graphs play an important role in statistical analysis, drawing graphics of one-, two-, or higher-dimensional data is an aspect of statistical programming.
- Type
- Chapter
- Information
- A First Course in Statistical Programming with R , pp. 1 - 6Publisher: Cambridge University PressPrint publication year: 2016