Skip to content

Commit

Permalink
update faq
Browse files Browse the repository at this point in the history
  • Loading branch information
elbersb committed Jan 30, 2024
1 parent 4a5f096 commit 9537bfc
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions vignettes/faq.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,25 @@ ggplot(seg_geom, aes(fill = ls)) +
)
```

## Can I compite local segregation scores for the H index?

See [this paper](https://osf.io/preprints/socarxiv/3juyc) for more information. The short
answer is that you can divide the local segregation scores of the M index by the entropy
of the group distribution. A weighted average of these scores must then equal the H index, as
the H index is just the M index divided by the entropy of the group distribution.

Here's an example:

```{r}
(mutual_total(schools00, "race", "school", weight = "n"))
local <- mutual_local(schools00, "race", "school", weight = "n", wide = TRUE)
(local[, sum(p * ls)]) # same as M index above
local[, ls_H := ls / entropy(schools00, "race", weight = "n")]
(local[, sum(p * ls_H)]) # same as H index above
```


## How can I compute margins-adjusted local segregation scores?

When using `mutual_difference`, supply `method = "shapley_detailed"`
Expand Down

0 comments on commit 9537bfc

Please sign in to comment.