You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/spatial-analysis-tutorial/rate-mapping.md
+23-3Lines changed: 23 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -196,17 +196,37 @@ While easy to calculate, the estimate for the variance can yield negative values
196
196
197
197
### EB rate map
198
198
199
-
You can use the following prompt to create an EB smoothed rate map:
199
+
You can use the following prompt to create an EB smoothed rate map by using the dataset with raw rates, which we will compare to the EB rates in the next step:
200
200
201
201
```
202
-
Can you calculate the empirical bayes smoothed rates using event variable LFW68 and base variable POPFW68, and create a box map using the empirical bayes smoothed rates?
202
+
Can you calculate the empirical bayes smoothed rates using event variable LFW68 and base variable POPFW68 from dataset with raw rates, and create a box map using the empirical bayes smoothed rates?
203
203
```
204
204
205
-
<img>
205
+
<imgwidth="1324"alt="Screenshot 2025-06-23 at 7 24 53 PM"src="https://github.com/user-attachments/assets/471c6e4a-aac5-4df0-b9d5-50cf481de7b9" />
206
206
207
207
In comparison to the box map for the crude rates and the excess rate map, none of the original outliers remain identified as such in the smoothed map. Instead, a new outlier is shown in the very southwestern corner of the state (Hamilton county).
208
208
209
209
Since many of the original outlier counties have small populations at risk (check in the data table), their EB smoothed rates are quite different (lower) from the original. In contrast, Hamilton county is one of the most populous counties (it contains the city of Cincinnati), so that its raw rate is barely adjusted. Because of that, it percolates to the top of the distribution and becomes an outlier.
210
210
211
211
To illustrate this phenomenon, we can systematically select observations in the box plot for the raw rates and compare their position in the box plot for the smoothed rates. This will reveal which observations are affected most.
212
212
213
+
We create the box plots in the usual way using the raw rates and the empirical bayes smoothed rates by prompting:
214
+
215
+
```
216
+
Can you create a box plot for the raw rates and the empirical bayes smoothed rates?
217
+
```
218
+
219
+
<imgwidth="1222"alt="Screenshot 2025-06-23 at 8 11 51 PM"src="https://github.com/user-attachments/assets/7a8f0a1c-9d5e-418d-a089-88af81ad7351" />
220
+
221
+
Now, the AI assistant will create two box plots for the raw rates and the empirical bayes smoothed rates. We select the three outliers in the raw rates box plot. The corresponding observations are within the upper quartile for the EB smoothed rates, but well within the fence, and thus no longer outliers after smoothing. We can of course also locate these observations on the map, or any other open views.
222
+
223
+
<imgwidth="1123"alt="Screenshot 2025-06-23 at 8 15 36 PM"src="https://github.com/user-attachments/assets/ff24346c-c804-42e3-9430-b2d2b40097a5" />
224
+
225
+
Next, we can carry out the reverse and select the outlier in the box plot for the EB smoothed rate. Its position is around the 75 percentile in the box plot for the crude rate. Also note how the range of the rates has shrunk. Many of the higher crude rates are well below 0.00012 for the EB rate, whereas the value for the EB outlier has barely changed.
226
+
227
+
<imgwidth="1129"alt="Screenshot 2025-06-23 at 8 15 19 PM"src="https://github.com/user-attachments/assets/c38531b0-bc50-4a46-aed8-0681f2535606" />
228
+
229
+
230
+
Here is a screen captured video of the above steps:
0 commit comments