| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Session 2: spatial models of the PP vote share | |||||||||||||||||||||||||
2 | Results from your R console (session2_workshop.R), 20 November 2026 | |||||||||||||||||||||||||
3 | ||||||||||||||||||||||||||
4 | Data | 8,131 municipalities, PP vote share in the Congress election of 23 July 2023 (percentage points). | ||||||||||||||||||||||||
5 | Weights | kNN7, made mutual (sym = TRUE), row-standardised. | ||||||||||||||||||||||||
6 | Runs | Two runs of section 7: (a) f <- form, without regional fixed effects; (b) f <- form_fe, with one intercept per autonomous community. | ||||||||||||||||||||||||
7 | Variables | light = ln(1 + VIIRS mean); age10 = mean age / 10; women10, foreign10 = shares / 10; city = 1 for the 95 cities. lag. = the same variable averaged over the neighbours (WX). | ||||||||||||||||||||||||
8 | Stars | * p < 0.10 ** p < 0.05 *** p < 0.01 (the convention of the slides; R's own summary() uses 0.05 / 0.01 / 0.001). | ||||||||||||||||||||||||
9 | Stars cells | Formulas: they read the estimate and the p-value blocks below them, so they update if a number is changed. | ||||||||||||||||||||||||
10 | Blue numbers | Typed in from the console output, exactly as R printed them. p-values printed as "< 2.2e-16" are stored as 0. | ||||||||||||||||||||||||
11 | Empty p-values | SAC and GNS: R could not compute some standard errors (NaN), so those coefficients have no stars. Their impacts are computed without simulation, so they have no p-values either. | ||||||||||||||||||||||||
12 | Section 10 | The SDM with regional intercepts of section 10 is the same model as the SDM of run (b), so it is not repeated. | ||||||||||||||||||||||||
13 | ||||||||||||||||||||||||||
14 | Sheets | |||||||||||||||||||||||||
15 | Coef_noFE | Coefficients of the 8 models, run (a), with stars; then estimates, standard errors and p-values. | ||||||||||||||||||||||||
16 | Coef_FE | The same for run (b), with regional fixed effects. | ||||||||||||||||||||||||
17 | Region_FE | The regional intercepts of run (b), with stars. | ||||||||||||||||||||||||
18 | Impacts_noFE | Direct, indirect and total impacts of the 8 models, run (a), with stars. | ||||||||||||||||||||||||
19 | Impacts_FE | The same for run (b). | ||||||||||||||||||||||||
20 | Fit_and_LR | AIC and log-likelihood of every model, and the 13 LR tests along the family tree, both runs. | ||||||||||||||||||||||||
21 | Tests | Moran of OLS residuals, LM tests, Hausman tests, the SAC/GNS weights on W and W2. | ||||||||||||||||||||||||
22 | Wider_W | Moran of the SDM residuals with wider W, and the SDM/SDEM re-estimated with k = 7, 10, 15, 20. | ||||||||||||||||||||||||
23 | ||||||||||||||||||||||||||
24 | ||||||||||||||||||||||||||
25 | ||||||||||||||||||||||||||
26 | ||||||||||||||||||||||||||
27 | ||||||||||||||||||||||||||
28 | ||||||||||||||||||||||||||
29 | ||||||||||||||||||||||||||
30 | ||||||||||||||||||||||||||
31 | ||||||||||||||||||||||||||
32 | ||||||||||||||||||||||||||
33 | ||||||||||||||||||||||||||
34 | ||||||||||||||||||||||||||
35 | ||||||||||||||||||||||||||
36 | ||||||||||||||||||||||||||
37 | ||||||||||||||||||||||||||
38 | ||||||||||||||||||||||||||
39 | ||||||||||||||||||||||||||
40 | ||||||||||||||||||||||||||
41 | ||||||||||||||||||||||||||
42 | ||||||||||||||||||||||||||
43 | ||||||||||||||||||||||||||
44 | ||||||||||||||||||||||||||
45 | ||||||||||||||||||||||||||
46 | ||||||||||||||||||||||||||
47 | ||||||||||||||||||||||||||
48 | ||||||||||||||||||||||||||
49 | ||||||||||||||||||||||||||
50 | ||||||||||||||||||||||||||
51 | ||||||||||||||||||||||||||
52 | ||||||||||||||||||||||||||
53 | ||||||||||||||||||||||||||
54 | ||||||||||||||||||||||||||
55 | ||||||||||||||||||||||||||
56 | ||||||||||||||||||||||||||
57 | ||||||||||||||||||||||||||
58 | ||||||||||||||||||||||||||
59 | ||||||||||||||||||||||||||
60 | ||||||||||||||||||||||||||
61 | ||||||||||||||||||||||||||
62 | ||||||||||||||||||||||||||
63 | ||||||||||||||||||||||||||
64 | ||||||||||||||||||||||||||
65 | ||||||||||||||||||||||||||
66 | ||||||||||||||||||||||||||
67 | ||||||||||||||||||||||||||
68 | ||||||||||||||||||||||||||
69 | ||||||||||||||||||||||||||
70 | ||||||||||||||||||||||||||
71 | ||||||||||||||||||||||||||
72 | ||||||||||||||||||||||||||
73 | ||||||||||||||||||||||||||
74 | ||||||||||||||||||||||||||
75 | ||||||||||||||||||||||||||
76 | ||||||||||||||||||||||||||
77 | ||||||||||||||||||||||||||
78 | ||||||||||||||||||||||||||
79 | ||||||||||||||||||||||||||
80 | ||||||||||||||||||||||||||
81 | ||||||||||||||||||||||||||
82 | ||||||||||||||||||||||||||
83 | ||||||||||||||||||||||||||
84 | ||||||||||||||||||||||||||
85 | ||||||||||||||||||||||||||
86 | ||||||||||||||||||||||||||
87 | ||||||||||||||||||||||||||
88 | ||||||||||||||||||||||||||
89 | ||||||||||||||||||||||||||
90 | ||||||||||||||||||||||||||
91 | ||||||||||||||||||||||||||
92 | ||||||||||||||||||||||||||
93 | ||||||||||||||||||||||||||
94 | ||||||||||||||||||||||||||
95 | ||||||||||||||||||||||||||
96 | ||||||||||||||||||||||||||
97 | ||||||||||||||||||||||||||
98 | ||||||||||||||||||||||||||
99 | ||||||||||||||||||||||||||
100 |