售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Simulation for Data Science with R
Table of Contents
Simulation for Data Science with R
Credits
About the Author
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Introduction
What is simulation and where is it applied?
Why use simulation?
Simulation and big data
Choosing the right simulation technique
Summary
References
2. R and High-Performance Computing
The R statistical environment
Basics in R
Some very basic stuff about R
Installation and updates
Help
The R workspace and the working directory
Data types
Vectors in R
Factors in R
list
data.frame
array
Missing values
Generic functions, methods, and classes
Data manipulation in R
Apply and friends with basic R
Basic data manipulation with the dplyr package
dplyr – creating a local data frame
dplyr – selecting lines
dplyr – order
dplyr – selecting columns
dplyr – uniqueness
dplyr – creating variables
dplyr – grouping and aggregates
dplyr – window functions
Data manipulation with the data.table package
data.table – variable construction
data.table – indexing or subsetting
data.table – keys
data.table – fast subsetting
data.table – calculations in groups
High performance computing
Profiling to detect computationally slow functions in code
Further benchmarking
Parallel computing
Interfaces to C++
Visualizing information
The graphics system in R
The graphics package
Warm-up example – a high-level plot
Control of graphics parameters
The ggplot2 package
References
3. The Discrepancy between Pencil-Driven Theory and Data-Driven Computational Solutions
Machine numbers and rounding problems
Example – the 64-bit representation of numbers
Convergence in the deterministic case
Example – convergence
Condition of problems
Summary
References
4. Simulation of Random Numbers
Real random numbers
Simulating pseudo random numbers
Congruential generators
Linear and multiplicative congruential generators
Lagged Fibonacci generators
More generators
Simulation of non-uniform distributed random variables
The inversion method
The alias method
Estimation of counts in tables with log-linear models
Rejection sampling
Simulating values from a normal distribution
Simulating random numbers from a Beta distribution
Truncated distributions
Metropolis - Hastings algorithm
A few words on Markov chains
The Metropolis sampler
The Gibbs sampler
The two-phase Gibbs sampler
The multiphase Gibbs sampler
Application in linear regression
The diagnosis of MCMC samples
Tests for random numbers
The evaluation of random numbers – an example of a test
Summary
References
5. Monte Carlo Methods for Optimization Problems
Numerical optimization
Gradient ascent/descent
Newton-Raphson methods
Further general-purpose optimization methods
Dealing with stochastic optimization
Simplified procedures (Star Trek, Spaceballs, and Spaceballs princess)
Metropolis-Hastings revisited
Gradient-based stochastic optimization
Summary
References
6. Probability Theory Shown by Simulation
Some basics on probability theory
Probability distributions
Discrete probability distributions
Continuous probability distributions
Winning the lottery
The weak law on large numbers
Emperor penguins and your boss
Limits and convergence of random variables
Convergence of the sample mean – weak law of large numbers
Showing the weak law of large numbers by simulation
The central limit theorem
Properties of estimators
Properties of estimators
Confidence intervals
A note on robust estimators
Summary
References
7. Resampling Methods
The bootstrap
A motivating example with odds ratios
Why the bootstrap works
A closer look at the bootstrap
The plug-in principle
Estimation of standard errors with bootstrapping
An example of a complex estimation using the bootstrap
The parametric bootstrap
Estimating bias with bootstrap
Confidence intervals by bootstrap
The jackknife
Disadvantages of the jackknife
The delete-d jackknife
Jackknife after bootstrap
Cross-validation
The classical linear regression model
The basic concept of cross validation
Classical cross validation – 70/30 method
Leave-one-out cross validation
k-fold cross validation
Summary
References
8. Applications of Resampling Methods and Monte Carlo Tests
The bootstrap in regression analysis
Motivation to use the bootstrap
The most popular but often worst method
Bootstrapping by draws from residuals
Proper variance estimation with missing values
Bootstrapping in time series
Bootstrapping in the case of complex sampling designs
Monte Carlo tests
A motivating example
The permutation test as a special kind of MC test
A Monte Carlo test for multiple groups
Hypothesis testing using a bootstrap
A test for multivariate normality
Size of the test
Power comparisons
Summary
References
9. The EM Algorithm
The basic EM algorithm
Some prerequisites
Formal definition of the EM algorithm
Introductory example for the EM algorithm
The EM algorithm by example of k-means clustering
The EM algorithm for the imputation of missing values
Summary
References
10. Simulation with Complex Data
Different kinds of simulation and software
Simulating data using complex models
A model-based simple example
A model-based example with mixtures
Model-based approach to simulate data
An example of simulating high-dimensional data
Simulating finite populations with cluster or hierarchical structures
Model-based simulation studies
Latent model example continued
A simple example of model-based simulation
A model-based simulation study
Design-based simulation
An example with complex survey data
Simulation of the synthetic population
Estimators of interest
Defining the sampling design
Using stratified sampling
Adding contamination
Performing simulations separately on different domains
Inserting missing values
Summary
References
11. System Dynamics and Agent-Based Models
Agent-based models
Dynamics in love and hate
Dynamic systems in ecological modeling
Summary
References
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜