Muutke küpsiste eelistusi

Spatial Microsimulation with R [Pehme köide]

(University of Leeds, UK),
  • Formaat: Paperback / softback, 260 pages, kõrgus x laius: 234x156 mm, kaal: 420 g, 13 Tables, black and white; 35 Illustrations, black and white
  • Sari: Chapman & Hall/CRC The R Series
  • Ilmumisaeg: 21-Mar-2016
  • Kirjastus: Chapman & Hall/CRC
  • ISBN-10: 1498711545
  • ISBN-13: 9781498711548
Teised raamatud teemal:
  • Formaat: Paperback / softback, 260 pages, kõrgus x laius: 234x156 mm, kaal: 420 g, 13 Tables, black and white; 35 Illustrations, black and white
  • Sari: Chapman & Hall/CRC The R Series
  • Ilmumisaeg: 21-Mar-2016
  • Kirjastus: Chapman & Hall/CRC
  • ISBN-10: 1498711545
  • ISBN-13: 9781498711548
Teised raamatud teemal:
Generate and Analyze Multi-Level Data Spatial microsimulation involves the generation, analysis, and modeling of individual-level data allocated to geographical zones. Spatial Microsimulation with R is the first practical book to illustrate this approach in a modern statistical programming language.

Get Insight into Complex BehaviorsThe book progresses from the principles underlying population synthesis toward more complex issues such as household allocation and using the results of spatial microsimulation for agent-based modeling. This equips you with the skills needed to apply the techniques to real-world situations. The book demonstrates methods for population synthesis by combining individual and geographically aggregated datasets using the recent R packages ipfp and mipfp. This approach represents the "best of both worlds" in terms of spatial resolution and person-level detail, overcoming issues of data confidentiality and reproducibility.

Implement the Methods on Your Own DataFull of reproducible examples using code and data, the book is suitable for students and applied researchers in health, economics, transport, geography, and other fields that require individual-level data allocated to small geographic zones. By explaining how to use tools for modeling phenomena that vary over space, the book enhances your knowledge of complex systems and empowers you to provide evidence-based policy guidance.

Arvustused

". . . the book provides an excellent introduction to the theory and practice of spatial microsimulation, as well as a bridge to working in R to actually do the various tasks described . . ." Ezra Haber Glenn, Journal of Statistical Software

"In this groundbreaking book, the authors present the ideas behind spatial microsimulation, giving clear, user-friendly guidance using the open source software R. Spatial Microsimulation with R provides the reader with firm knowledge of the field as well as the tools to apply the methods to his or her own data. Written in an extremely accessible way, this book demonstrates the key steps in spatial microsimulation, from theory into practice. It will be deservedly instrumental in fuelling the growing interest in spatial microsimulation amongst geographers, economists, urban and regional planners, and public- and private-sector decision makers." Richard Harris, Professor of Quantitative Social Geography, University of Bristol

"This book fills an important gap in the existing literature. What is currently missing is a book mapping out the complete picture from what spatial microsimulation is and why it is useful, how to prepare the data, how to actually build the model, how to validate it, and how to use the resulting dataset. A particular strength of the book is the close connection between theory and implementation. The book includes very useful code snippets while the complete scripts are provided on the corresponding Github repositorythis clearly sets standards for open science." Ulrike Deetjen, Oxford University

"Lovelace and Dumont provide a great service to the microsimulation community in developing a clear and coherent exposition of the use of the R computer language for implementing spatial applications. Required reading for all those involved in agent-based and microsimulation modeling." Michael Batty, Centre for Advanced Spatial Analysis, University College London

"Spatial Microsimulation with R is a well-written and concise work on a topic of broad appeal. The book is structured in a logical way, which makes it straightforward for the reader to pull out pertinent information. It is a useful reference that provides value for individuals of diverse backgrounds and can be a valuable resource for individuals seeking new applications for spatial microsimulation." Journal of the American Statistical Association

" . . .this book is an excellent resource for everyone who want to learn how to do spatial microsimulation. The possibility to download the contents of the book, compile it andwork interactively with the code also makes it a great example of dynamic documents and reproducible research." Netherlands Environmental Assessment Agency (PBL)

"There are multiple books on spatial microsimulation and hundreds more research papers detailing the various applications of studies. However, bar a few exceptions, they lack transparency and reproducibility. It creates a situation whereby researchers simultaneously encourage the uptake of the method, whilst also creating barriers by obscuring methodologies. Lovelace and Dumonts book sets to address this flaw through demonstrating how to undertake a spatial microsimulation. . . Where the book sets itself apart from other books is in its applied nature. At the centre of their approach is a learn by doing mentality which serves the book well. Examples are used to demonstrate approaches and the authors encourage thinking beyond the material presented. Of note, Lovelace and Dumont show step-by-step what is happening when using IPF and how to code this, rather than jumping straight to bespoke R packages that can run it in single lines of code (which are also covered). Content is always clearly set out, with each step explained in detail. The approach helps to guide the reader along in understanding fairly complicated methods. . . Lovelace and Dumonts book is a fine addition to the library of anyone interested in quantitative methods, let alone those wanting to generate their own spatial microdata." Mark A. Green, Applied Spatial Analysis ". . . the book provides an excellent introduction to the theory and practice of spatial microsimulation, as well as a bridge to working in R to actually do the various tasks described . . ." Ezra Haber Glenn, Journal of Statistical Software

"In this groundbreaking book, the authors present the ideas behind spatial microsimulation, giving clear, user-friendly guidance using the open source software R. Spatial Microsimulation with R provides the reader with firm knowledge of the field as well as the tools to apply the methods to his or her own data. Written in an extremely accessible way, this book demonstrates the key steps in spatial microsimulation, from theory into practice. It will be deservedly instrumental in fuelling the growing interest in spatial microsimulation amongst geographers, economists, urban and regional planners, and public- and private-sector decision makers." Richard Harris, Professor of Quantitative Social Geography, University of Bristol

"This book fills an important gap in the existing literature. What is currently missing is a book mapping out the complete picture from what spatial microsimulation is and why it is useful, how to prepare the data, how to actually build the model, how to validate it, and how to use the resulting dataset. A particular strength of the book is the close connection between theory and implementation. The book includes very useful code snippets while the complete scripts are provided on the corresponding Github repositorythis clearly sets standards for open science." Ulrike Deetjen, Oxford University

"Lovelace and Dumont provide a great service to the microsimulation community in developing a clear and coherent exposition of the use of the R computer language for implementing spatial applications. Required reading for all those involved in agent-based and microsimulation modeling." Michael Batty, Centre for Advanced Spatial Analysis, University College London

"Spatial Microsimulation with R is a well-written and concise work on a topic of broad appeal. The book is structured in a logical way, which makes it straightforward for the reader to pull out pertinent information. It is a useful reference that provides value for individuals of diverse backgrounds and can be a valuable resource for individuals seeking new applications for spatial microsimulation." Journal of the American Statistical Association

" . . .this book is an excellent resource for everyone who want to learn how to do spatial microsimulation. The possibility to download the contents of the book, compile it andwork interactively with the code also makes it a great example of dynamic documents and reproducible research." Netherlands Environmental Assessment Agency (PBL)

"There are multiple books on spatial microsimulation and hundreds more research papers detailing the various applications of studies. However, bar a few exceptions, they lack transparency and reproducibility. It creates a situation whereby researchers simultaneously encourage the uptake of the method, whilst also creating barriers by obscuring methodologies. Lovelace and Dumonts book sets to address this flaw through demonstrating how to undertake a spatial microsimulation. . . Where the book sets itself apart from other books is in its applied nature. At the centre of their approach is a learn by doing mentality which serves the book well. Examples are used to demonstrate approaches and the authors encourage thinking beyond the material presented. Of note, Lovelace and Dumont show step-by-step what is happening when using IPF and how to code this, rather than jumping straight to bespoke R packages that can run it in single lines of code (which are also covered). Content is always clearly set out, with each step explained in detail. The approach helps to guide the reader along in understanding fairly complicated methods. . . Lovelace and Dumonts book is a fine addition to the library of anyone interested in quantitative methods, let alone those wanting to generate their own spatial microdata." Mark A. Green, Applied Spatial Analysis

I Introducing spatial microsimulation with R
1(44)
1 Introduction
3(15)
1.1 Who this book is for and how to use it
3(2)
1.2 Motivations
5(2)
1.3 A definition of spatial microsimulation
7(2)
1.4 Learning by doing
9(1)
1.5 Why spatial microsimulation with R?
10(2)
1.6 Learning the R language
12(1)
1.7 Typographic conventions
13(1)
1.8 An overview of the book
14(4)
2 SimpleWorld: A worked example of spatial microsimulation
17
2.1 Getting setup with the RStudio environment
18(4)
2.1.1 Installing R
18(1)
2.1.2 RStudio
19(1)
2.1.3 Projects
20(1)
2.1.4 Downloading data for the book
21(1)
2.2 SimpleWorld data
22(3)
2.3 Generating a weight matrix
25(2)
2.4 Spatial microdata
27(1)
2.5 SimpleWorld in context
28(1)
2.6
Chapter summary
29(2)
3 What is spatial microsimulation?
31(14)
3.1 Terminology
33(2)
3.1.1 Spatial microsimulation as SimCity
34(1)
3.1.2 Spatial microsimulation: method or approach?
34(1)
3.2 What spatial microsimulation is not
35(3)
3.3 Applications
38(5)
3.3.1 Health applications
38(1)
3.3.2 Economic policy evaluation
39(2)
3.3.3 Transport
41(2)
3.4 Assumptions
43(1)
3.5
Chapter summary
44(1)
II Generating spatial microdata
45(138)
4 Data preparation
47(18)
4.1 Accessing the input data
48(2)
4.2 Target and constraint variables
50(4)
4.3 Loading input data
54(3)
4.4 Subsetting to remove excess information
57(1)
4.5 Re-categorising individual level variables
58(1)
4.6 Matching individual and aggregate level data names
59(1)
4.7 `Flattening' the individual level data
59(3)
4.8
Chapter summary
62(3)
5 Population synthesis
65(46)
5.1 Weighting algorithms
66(4)
5.2 Iterative Proportional Fitting
70(18)
5.2.1 IPF in theory
70(2)
5.2.2 IPF in R
72(7)
5.2.3 IPF with ipfp
79(4)
5.2.4 IPF with mipfp
83(5)
5.3 Integerisation
88(7)
5.3.1 Concept of integerisation
88(5)
5.3.2 Example of integerisation
93(2)
5.4 Expansion
95(2)
5.4.1 Weights per individual
95(1)
5.4.2 Weights per category
96(1)
5.5 Integerisation and expansion
97(1)
5.6 Comparing ipfp with mipfp
98(12)
5.6.1 Comparing the methods
99(2)
5.6.2 Comparing the weights for SimpleWorld
101(6)
5.6.3 Comparing the results for SimpleWorld
107(1)
5.6.4 Speed comparisons
108(2)
5.7
Chapter summary
110(1)
6 Alternative approaches to population synthesis
111(12)
6.1 GREGWT
111(2)
6.2 Population synthesis as an optimization problem
113(7)
6.2.1 Reweighting with optim and GenSA
116(2)
6.2.2 Combinatorial optimisation
118(2)
6.3 simPop
120(1)
6.4 The Urban Data Science Toolkit (UDST)
121(1)
6.5
Chapter summary
121(2)
7 Spatial microsimulation in the wild
123(20)
7.1 Selection of constraint variables
124(2)
7.2 Preparing the input data
126(2)
7.3 Using the ipfp package
128(4)
7.3.1 Performing IPF on CakeMap data
128(3)
7.3.2 Integerisation
131(1)
7.4 Using the mipfp package
132(5)
7.4.1 Performing IPF on CakeMap data
132(5)
7.5 Comparing methods of reweighting large datasets
137(5)
7.5.1 Comparison of results
138(2)
7.5.2 Comparison of times
140(2)
7.6
Chapter summary
142(1)
8 Model checking and evaluation
143(18)
8.1 Internal validation
145(13)
8.1.1 Pearson's r
146(1)
8.1.2 Absolute error measures
147(1)
8.1.3 Root mean squared error
148(1)
8.1.4 Chi-squared
149(1)
8.1.5 Which test to use?
149(1)
8.1.6 Internal validation of CakeMap
150(8)
8.2 Empty cells
158(1)
8.3 External validation
159(1)
8.4
Chapter summary
160(1)
9 Population synthesis without microdata
161(10)
9.1 Global cross-tables and local marginal distributions
161(7)
9.2 Two level aggregated data
168(2)
9.3
Chapter summary
170(1)
10 Household allocation
171(12)
10.1 Independent data (individuals and households)
172(2)
10.1.1 Household type selection
173(1)
10.1.2 Constituent members selection
173(1)
10.1.3 End of the household generation process
174(1)
10.2 Cross data: individual and household level information
174(7)
10.2.1 Without additional household's data
175(2)
10.2.2 With additional household's data
177(4)
10.3
Chapter summary
181(2)
III Modelling spatial microdata
183(66)
11 The TRESIS approach to spatial microsimulation
185(22)
11.1 Overview of TRESIS modelling system
186(2)
11.1.1 Differences between TRESIS and other microsimulation systems
188(1)
11.2 Synthetic households
188(9)
11.2.1 What are synthetic households?
188(1)
11.2.2 Required data for generating synthetic households
189(1)
11.2.3 Synthetic households in R
190(7)
11.3 Using demand models to allocate synthetic households to zones using R
197(6)
11.3.1 Simple discrete choice model for residential location
198(3)
11.3.2 Results
201(2)
11.4 Conclusions
203(2)
11.4.1 Limitations
203(2)
11.4.2 MetroScan-TI
204
11.4.3 Extending residential location to transport models in R
205(1)
11.5
Chapter summary
205(2)
12 Spatial microsimulation for agent-based models
207(36)
12.1 ABM software
208(1)
12.2 Setting up SimpleWorld in NetLogo
209(5)
12.2.1 Graphical User Interface in NetLogo
210(4)
12.3 Allocating attributes to agents
214(5)
12.3.1 Defining variables
215(1)
12.3.2 Reading agent data - Option 1
216(1)
12.3.3 Reading agent data - Option 2
217(2)
12.4 Running SimpleWorld
219(12)
12.4.1 More variable definitions
219(2)
12.4.2 More setup procedures
221(1)
12.4.3 The main Go procedure
222(5)
12.4.4 Adding plots to the model
227(1)
12.4.5 Stopping behavior
228(3)
12.5 Control the ABM from R
231(9)
12.5.1 Running a single NetLogo simulation
234(3)
12.5.2 Running multiple NetLogo simulations
237(3)
12.6
Chapter summary
240(3)
13 Appendix: Getting up-to-speed with R
243(6)
13.1 R understands vector algebra
243(1)
13.2 R is object orientated
244(1)
13.3 Subsetting in R
245(2)
13.4 Further R resources
247(2)
Glossary 249(4)
Bibliography 253(6)
Index 259
Robin Lovelace is a University Academic Fellow at the University of Leeds specializing in methods of spatial data analysis and applied transport modeling. Creator of the stplanr package and a number of popular tutorials, he is an experienced R user, teacher, and developer. Robin uses open source software daily for spatial analysis, map making, statistics, and modeling. His current research focuses on online interactive mapping and modeling to provide the evidence base needed for a transition away from fossil fuels in the transport sector. Morgane Dumont is an applied mathematician currently undertaking a PhD at the University of Namur. She has a wealth of experience programming in R, Python, C, Fortran, and MATLAB®. Her research focuses on forecasting the health needs of the elderly in 2030 for Belgium. To achieve this aim, Morgane is developing a synthetic population for Belgium as an input to an agent-based model.