Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Simulation for Data Science with R

You're reading from   Simulation for Data Science with R Effective Data-driven Decision Making

Arrow left icon
Product type Paperback
Published in Jun 2016
Publisher Packt
ISBN-13 9781785881169
Length 398 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Matthias Templ Matthias Templ
Author Profile Icon Matthias Templ
Matthias Templ
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Introduction 2. R and High-Performance Computing FREE CHAPTER 3. The Discrepancy between Pencil-Driven Theory and Data-Driven Computational Solutions 4. Simulation of Random Numbers 5. Monte Carlo Methods for Optimization Problems 6. Probability Theory Shown by Simulation 7. Resampling Methods 8. Applications of Resampling Methods and Monte Carlo Tests 9. The EM Algorithm 10. Simulation with Complex Data 11. System Dynamics and Agent-Based Models Index

Choosing the right simulation technique

The bad news is that there is no general guidance and no general method for simulation. The choice of the right simulation technique rather depends on the underlying problem, data set, and the aim of the study.

We already mentioned in which areas simulation plays a role. Depending on the area of interest, different techniques are considered. For a Bayesian analysis, the methods differ between general inference statistics using resampling techniques, and when optimization comes into the topic. The methods change completely when interaction of populations or individuals are in focus, or when predictions about the future on an individual level (micro-simulation) are required.

However, some general questions may give a little guidance for choosing the right technique. This is illustrated in Table 1.1. Of course, it is often the case that a clear decision cannot be made. For example, if you work with a sample, optimization techniques might be used for several reasons, but the main aim of optimization is more general. It can be applied to samples or population data. Another example includes, for example, in agent-based microsimulation of course one can compare models, but it's not the main aim. Thus this table should give only a very rough categorization of methods for basic questions. It should be clear that optimization methods, methods for system dynamics, and agent-based micro-simulation techniques may differ to the methods that are developed to express the uncertainty of estimators, such as resampling methods.

The following table describes choosing the right simulation technique, Monte Carlo (MC) techniques, and resampling techniques; Markov chain Monte Carlo (MCMC) methods; MC test Monte Carlo techniques applied to hypothesis testing, optimization (O), system dynamics (SD), agent-based modeling (ABM), design-based simulation (DBS), and model-based simulation (MBS):

Question

Yes

No

Do you work with a sample?

MC, MC test, MBS, DBS

ABM, SD

Is variability/randomness important?

MC, MC test, MBS, DBS

ABM, SD

Is the number of observations large?

ABM

SD, MCMC

Do you apply a hypothesis test?

MC test

ABM, DBS, SD, Opt

Is the sample drawn from a finite population?

DBS

MBS

Do you work with a population?

ABM, Opt, SD

MC, MC test

Do you want to compare models?

MC

ABM, SD, Opt

Do you apply Bayesian statistics?

MCMC

SD, Opt

Do you need to simulate certain distributions?

RN, MCMC

SD, Opt

Is probability theory a main issue?

ABM, MCMC

MC, MBS, DBS

Has something to be optimized?

Opt

MC, MC test, MBS

Dynamic rules of behavior within individuals.

SD, ABM

All others

Do changes to the system happen over time?

SD

All others

Can the time-frame of interest be long?

ABM, SD

All others

Please enjoy all the chapters mentioned, simulate a cozy burning fire with R's package animation (Yihui 2013) in Figure 1.1, and start to explore all the different issues in Simulation for Data Science with R:

Choosing the right simulation technique

Figure 1.1: Snapshot of a simulated burning fire for your coziness

To run the burning fire simulation, have a look at the code on this website: http://yihui.name/en/2009/06/simulation-of-burning-fire-in-r/.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime