|
I Introducing spatial microsimulation with R |
|
|
1 | (44) |
|
|
3 | (15) |
|
1.1 Who this book is for and how to use it |
|
|
3 | (2) |
|
|
5 | (2) |
|
1.3 A definition of spatial microsimulation |
|
|
7 | (2) |
|
|
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) |
|
|
18 | (1) |
|
|
19 | (1) |
|
|
20 | (1) |
|
2.1.4 Downloading data for the book |
|
|
21 | (1) |
|
|
22 | (3) |
|
2.3 Generating a weight matrix |
|
|
25 | (2) |
|
|
27 | (1) |
|
2.5 SimpleWorld in context |
|
|
28 | (1) |
|
|
29 | (2) |
|
3 What is spatial microsimulation? |
|
|
31 | (14) |
|
|
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) |
|
|
38 | (5) |
|
3.3.1 Health applications |
|
|
38 | (1) |
|
3.3.2 Economic policy evaluation |
|
|
39 | (2) |
|
|
41 | (2) |
|
|
43 | (1) |
|
|
44 | (1) |
|
II Generating spatial microdata |
|
|
45 | (138) |
|
|
47 | (18) |
|
4.1 Accessing the input data |
|
|
48 | (2) |
|
4.2 Target and constraint variables |
|
|
50 | (4) |
|
|
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) |
|
|
62 | (3) |
|
|
65 | (46) |
|
|
66 | (4) |
|
5.2 Iterative Proportional Fitting |
|
|
70 | (18) |
|
|
70 | (2) |
|
|
72 | (7) |
|
|
79 | (4) |
|
|
83 | (5) |
|
|
88 | (7) |
|
5.3.1 Concept of integerisation |
|
|
88 | (5) |
|
5.3.2 Example of integerisation |
|
|
93 | (2) |
|
|
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) |
|
|
108 | (2) |
|
|
110 | (1) |
|
6 Alternative approaches to population synthesis |
|
|
111 | (12) |
|
|
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) |
|
|
120 | (1) |
|
6.4 The Urban Data Science Toolkit (UDST) |
|
|
121 | (1) |
|
|
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) |
|
|
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) |
|
|
142 | (1) |
|
8 Model checking and evaluation |
|
|
143 | (18) |
|
|
145 | (13) |
|
|
146 | (1) |
|
8.1.2 Absolute error measures |
|
|
147 | (1) |
|
8.1.3 Root mean squared error |
|
|
148 | (1) |
|
|
149 | (1) |
|
|
149 | (1) |
|
8.1.6 Internal validation of CakeMap |
|
|
150 | (8) |
|
|
158 | (1) |
|
|
159 | (1) |
|
|
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) |
|
|
170 | (1) |
|
|
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) |
|
|
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) |
|
|
201 | (2) |
|
|
203 | (2) |
|
|
203 | (2) |
|
|
204 | |
|
11.4.3 Extending residential location to transport models in R |
|
|
205 | (1) |
|
|
205 | (2) |
|
12 Spatial microsimulation for agent-based models |
|
|
207 | (36) |
|
|
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) |
|
|
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) |
|
|
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) |
|
|
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) |
|
|
245 | (2) |
|
|
247 | (2) |
Glossary |
|
249 | (4) |
Bibliography |
|
253 | (6) |
Index |
|
259 | |