Book Image

Simulation for Data Science with R

By : Matthias Templ
Book Image

Simulation for Data Science with R

By: Matthias Templ

Overview of this book

Data Science with R aims to teach you how to begin performing data science tasks by taking advantage of Rs powerful ecosystem of packages. R being the most widely used programming language when used with data science can be a powerful combination to solve complexities involved with varied data sets in the real world. The book will provide a computational and methodological framework for statistical simulation to the users. Through this book, you will get in grips with the software environment R. After getting to know the background of popular methods in the area of computational statistics, you will see some applications in R to better understand the methods as well as gaining experience of working with real-world data and real-world problems. This book helps uncover the large-scale patterns in complex systems where interdependencies and variation are critical. An effective simulation is driven by data generating processes that accurately reflect real physical populations. You will learn how to plan and structure a simulation project to aid in the decision-making process as well as the presentation of results. By the end of this book, you reader will get in touch with the software environment R. After getting background on popular methods in the area, you will see applications in R to better understand the methods as well as to gain experience when working on real-world data and real-world problems.
Table of Contents (18 chapters)
Simulation for Data Science with R
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Bootstrapping in the case of complex sampling designs


We already saw many applications where all these samples were drawn completely at random. However, this is often not the case when one has little information on a finite population, or when the data collection is based on a complex survey design. Of course such information is used to draw a sample in such a manner that costs are minimal. In other words, as an example from business statistics: a lot of small- and medium-sized companies exist in Austria but not many large ones. For precise estimates we need all the largest companies (selection probability 1), but the probability of selection of small companies can be much lower. A complex survey design allows us to draw a good sample with minimal costs.

In complex survey sampling, individuals are therefore sampled with known inclusion probabilities from a population of size N to end up with a sample of size n. The inclusion probabilities can differ between strata (partitions of the population...