Description Usage Arguments Details Value References Examples

Computes and decomposes the Mutual Information index into "between" and "within" terms. The "within" terms can also be decomposed into "exclusive contributions" of segregation sources defined either by group or unit characteristics. The mathematical components required to compute each "within" term can also be displayed at the user's request. The results can be computed over subsamples defined by the user.

1 2 3 4 5 6 7 8 9 10 |

`data` |
An object from the "data.table" and "mutual.data" classes. |

`group` |
A categorical variable name or vector of categorical variables names contained in |

`unit` |
A categorical variable name or vector of categorical variables names contained in |

`within` |
A categorical variable name or vector of categorical variables names contained in |

`by` |
A categorical variable name or vector of categorical variables names contained in |

`contribution.from` |
A variable of character type that can be 'group_vars' or 'unit_vars', or also, a categorical
variable name or vector of categorical variables names contained in the |

`components` |
A boolean value. If TRUE and the |

`cores` |
A positive integer. Defines the amount of CPU cores to use in parallelization tasks. If |

Mixing `group`

variables with `unit`

variables in `contribution.from`

will produce an error.

A `data.table`

if the `components`

option is `FALSE`

; a list if the `components`

option is `TRUE`

,
the `within`

option is not `NULL`

and the `by`

option is `NULL`

; or a list of lists if the `components`

option is `TRUE`

, and both `within`

and `by`

options are not `NULL`

.

Frankel, D. and Volij, O. (2011). Measuring school segregation. *Journal of Economic Theory, 146*(1):1-38.
doi: 10.1016/j.jet.2010.10.008.

Guinea-Martin, D., Mora, R., & Ruiz-Castillo, J. (2018). The evolution of gender segregation over the life course.
*American Sociological Review, 83*(5), 983-1019. doi: 10.1177/0003122418794503.

Mora, R. and Guinea-Martin, D. (2021). Computing decomposable multigroup indexes of segregation. *UC3M Working
papers, Economics 31803*. Universidad Carlos III de Madrid. Departamento de EconomÃa.

Mora, R. and Ruiz-Castillo, J. (2011). Entropy-based segregation indices. *Sociological Methodology, 41*(1):159-194.
doi: 10.1111/j.1467-9531.2011.01237.x.

Theil, H. and Finizza, A. J. (1971). A note on the measurement of racial integration of schools by means of
informational concepts. *The Journal of Mathematical Sociology, 1*(2):187-193. doi: 10.1080/0022250X.1971.9989795.

1 2 3 4 5 6 7 8 9 10 | ```
# To compute the overall measure of school segregation by socioeconomic and ethnic status.
mutual(data = DT_test, group = c("csep", "ethnicity"), unit = "school")
# Computation of the exclusive effect of specific segregation sources on the overall measure, e.g.,
# socioeconomic and ethnic contributions, and the contribution that cannot be attributed to any of
# them (the "interaction" term).
mutual(data = DT_test, group = c("csep", "ethnicity"), unit = "school", by = "region",
contribution.from = "group_vars")
# For more information on the package, refer to the manual and the README file.
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.