## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

## Book Description

Computational statistics and statistical computing are two areas that employ computational, graphical, and numerical approaches to solve statistical problems, making the versatile R language an ideal computing environment for these fields. One of the first books on these topics to feature R, Statistical Computing with R covers the traditional core material of computational statistics, with an emphasis on using the R language via an examples-based approach. Suitable for an introductory course in computational statistics or for self-study, it includes R code for all examples and R notes to help explain the R programming concepts.

After an overview of computational statistics and an introduction to the R computing environment, the book reviews some basic concepts in probability and classical statistical inference. Each subsequent chapter explores a specific topic in computational statistics. These chapters cover the simulation of random variables from probability distributions, the visualization of multivariate data, Monte Carlo integration and variance reduction methods, Monte Carlo methods in inference, bootstrap and jackknife, permutation tests, Markov chain Monte Carlo (MCMC) methods, and density estimation. The final chapter presents a selection of examples that illustrate the application of numerical methods using R functions.

Focusing on implementation rather than theory, this text serves as a balanced, accessible introduction to computational statistics and statistical computing.

1. Preliminaries
2. Preface
3. Chapter 1 Introduction
1. 1.1 Computational Statistics and Statistical Computing
2. 1.2 The R Environment
3. 1.3 Getting Started with R
5. 1.5 Functions
6. 1.6 Arrays, Data Frames, and Lists
7. 1.7 Workspace and Files
8. 1.8 Using Scripts
9. 1.9 Using Packages
10. 1.10 Graphics
4. Chapter 2 Probability and Statistics Review
1. 2.1 Random Variables and Probability
2. 2.2 Some Discrete Distributions
3. 2.3 Some Continuous Distributions
4. 2.4 Multivariate Normal Distribution
5. 2.5 Limit Theorems
6. 2.6 Statistics
7. 2.7 Bayes’ Theorem and Bayesian Statistics
8. 2.8 Markov Chains
5. Chapter 3 Methods for Generating Random Variables
1. 3.1 Introduction
2. 3.2 The Inverse Transform Method
3. 3.3 The Acceptance-Rejection Method
4. 3.4 Transformation Methods
5. 3.5 Sums and Mixtures
6. 3.6 Multivariate Distributions
1. 3.6.1 Multivariate Normal Distribution
2. 3.6.2 Mixtures of Multivariate Normals
3. 3.6.3 Wishart Distribution
4. 3.6.4 Uniform Distribution on the d-Sphere
7. 3.7 Stochastic Processes
8. Exercises
6. Chapter 4 Visualization of Multivariate Data
1. 4.1 Introduction
2. 4.2 Panel Displays
3. 4.3 Surface Plots and 3D Scatter Plots
1. 4.3.1 Surface plots
2. 4.3.2 Three-dimensional scatterplot
4. 4.4 Contour Plots
5. 4.5 Other 2D Representations of Data
6. 4.6 Other Approaches to Data Visualization
7. Exercises
7. Chapter 5 Monte Carlo Integration and Variance Reduction
1. 5.1 Introduction
2. 5.2 Monte Carlo Integration
1. 5.2.1 Simple Monte Carlo estimator
2. 5.2.2 Variance and Efficiency
3. 5.3 Variance Reduction
4. 5.4 Antithetic Variables
5. 5.5 Control Variates
6. 5.6 Importance Sampling
7. 5.7 Stratified Sampling
8. 5.8 Stratified Importance Sampling
9. Exercises
10. R Code
8. Chapter 6 Monte Carlo Methods in Inference
1. 6.1 Introduction
2. 6.2 Monte Carlo Methods for Estimation
1. 6.2.1 Monte Carlo estimation and standard error
2. 6.2.2 Estimation of MSE
3. 6.2.3 Estimating a confidence level
3. 6.3 Monte Carlo Methods for Hypothesis Tests
1. 6.3.1 Empirical Type I error rate
2. 6.3.2 Power of a Test
3. 6.3.3 Power comparisons
4. 6.4 Application: “Count Five” Test for Equal Variance
5. Exercises
6. Projects
9. Chapter 7 Bootstrap and Jackknife
1. 7.1 The Bootstrap
2. 7.2 The Jackknife
3. 7.3 Jackknife-after-Bootstrap
4. 7.4 Bootstrap Confidence Intervals
5. 7.5 Better Bootstrap Confidence Intervals
6. 7.6 Application: Cross Validation
7. Exercises
8. Projects
10. Chapter 8 Permutation Tests
1. 8.1 Introduction
2. 8.2 Tests for Equal Distributions
3. 8.3 Multivariate Tests for Equal Distributions
4. 8.4 Application: Distance Correlation
5. Exercises
6. Projects
11. Chapter 9 Markov Chain Monte Carlo Methods
1. 9.1 Introduction
2. 9.2 The Metropolis-Hastings Algorithm
3. 9.3 The Gibbs Sampler
4. 9.4 Monitoring Convergence
5. 9.5 Application: Change Point Analysis
6. Exercises
7. R Code
12. Chapter 10 Probability Density Estimation
1. 10.1 Univariate Density Estimation
1. 10.1.1 Histograms
2. 10.1.2 Frequency Polygon Density Estimate
3. 10.1.3 The Averaged Shifted Histogram
2. 10.2 Kernel Density Estimation
3. 10.3 Bivariate and Multivariate Density Estimation
1. 10.3.1 Bivariate Frequency Polygon
2. 10.3.2 Bivariate ASH
3. 10.3.3 Multidimensional kernel methods
4. 10.4 Other Methods of Density Estimation
5. Exercises
6. R Code
13. Chapter 11 Numerical Methods in R
1. 11.1 Introduction
2. 11.2 Root-finding in One Dimension
3. 11.3 Numerical Integration
4. 11.4 Maximum Likelihood Problems
5. 11.5 One-dimensional Optimization
6. 11.6 Two-dimensional Optimization
7. 11.7 The EM Algorithm
8. 11.8 Linear Programming – The Simplex Method
9. 11.9 Application: Game Theory
10. Exercises
14. Appendix A Notation
15. Appendix B Working with Data Frames and Arrays
1. B.1 Resampling and Data Partitioning
2. B.2 Subsetting and Reshaping Data
3. B.3 Data Entry and Data Analysis
1. B.3.1 Manual Data Entry
2. B.3.2 Recoding Missing Values
3. B.3.3 Reading and Converting Dates
4. B.3.4 Importing/exporting .csv files
5. B.3.5 Examples of data entry and analysis
16. References