Skip to content

Commit

Permalink
prepare CRAN release
Browse files Browse the repository at this point in the history
  • Loading branch information
elbersb committed Feb 8, 2021
1 parent ce8c6c9 commit b4102f8
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 16 deletions.
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: segregation
Type: Package
Title: Entropy-Based Segregation Indices
Version: 0.4.0.9000
Version: 0.5.0
Authors@R: person("Benjamin", "Elbers", email = "[email protected]",
role = c("aut", "cre"), comment = c(ORCID = "0000-0001-5392-3448"))
Description: Computes entropy-based segregation indices, as developed by
Expand All @@ -11,7 +11,8 @@ Description: Computes entropy-based segregation indices, as developed by
and Frankel and Volij (2011) <doi:10.1016/j.jet.2010.10.008>,
is a measure of segregation that is highly decomposable. The package provides
tools to decompose the index by units and groups (local segregation),
and by within and between terms.
and by within and between terms. The package also provides a method to decompose
differences in segregation as described by Elbers (2021) <doi:10.1177/0049124121986204>
Includes standard error estimation by bootstrapping.
License: MIT + file LICENSE
Imports: data.table
Expand Down
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# segregation 0.4.0.9000
# segregation 0.5.0

* dissimilarity: support for the index of dissimilarity
* add CI argument for confidence intervals
* mutual_within: report ent_ratio instead of h_weight
* matrix_to_long: convert contingency tables into long form
* add vignette
* add introductory vignette

# segregation 0.4.0

Expand Down
7 changes: 4 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ on the Mutual Information Index (M) and Theil's Information Index (H). The index
Find more information in the [vignette](https://elbersb.github.io/segregation/articles/segregation.html) and the [documentation](https://elbersb.de/segregation).

- calculate total, between, within, and local segregation
- decompose differences in total segregation over time
- decompose differences in total segregation over time (Elbers 2020)
- estimate standard errors and confidence intervals via bootstrapping
- every method returns a [tidy](https://vita.had.co.nz/papers/tidy-data.html) [data.table](https://rdatatable.gitlab.io/data.table/) for easy post-processing and plotting
- it's fast, because it uses the [`data.table`](https://rdatatable.gitlab.io/data.table/) package internally

Most of the procedures implemented in this package are described in more detail [in this working paper](https://osf.io/preprints/socarxiv/ya7zs/).
Most of the procedures implemented in this package are described in more detail [in this SMR paper](https://journals.sagepub.com/doi/full/10.1177/0049124121986204) ([Preprint](https://osf.io/preprints/socarxiv/ya7zs/)).

## Usage

Expand Down Expand Up @@ -120,7 +120,8 @@ Mora, R., & Ruiz-Castillo, J. (2003). Additively decomposable segregation indexe
Deutsch, J., Flückiger, Y. & Silber, J. (2009).
Analyzing Changes in Occupational Segregation: The Case of Switzerland (1970–2000), in: Yves Flückiger, Sean F. Reardon, Jacques Silber (eds.) Occupational and Residential Segregation (Research on Economic Inequality, Volume 17), 171–202.

Elbers, B. (2019). A Method for Studying Difference in Segregation Levels Across Time and Space. SocArXiv Working Paper. https://osf.io/preprints/socarxiv/ya7zs/
Elbers, B. (2021). A Method for Studying Differences in Segregation Across Time and Space.
Sociological Methods & Research. https://doi.org/10.1177/0049124121986204

Theil, H. (1971). Principles of Econometrics. New York: Wiley.

Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Find more information in the
and the [documentation](https://elbersb.de/segregation).

- calculate total, between, within, and local segregation
- decompose differences in total segregation over time
- decompose differences in total segregation over time (Elbers 2020)
- estimate standard errors and confidence intervals via bootstrapping
- every method returns a
[tidy](https://vita.had.co.nz/papers/tidy-data.html)
Expand All @@ -30,8 +30,9 @@ and the [documentation](https://elbersb.de/segregation).
internally

Most of the procedures implemented in this package are described in more
detail [in this working
paper](https://osf.io/preprints/socarxiv/ya7zs/).
detail [in this SMR
paper](https://journals.sagepub.com/doi/full/10.1177/0049124121986204)
([Preprint](https://osf.io/preprints/socarxiv/ya7zs/)).

## Usage

Expand Down Expand Up @@ -164,9 +165,9 @@ Flückiger, Sean F. Reardon, Jacques Silber (eds.) Occupational and
Residential Segregation (Research on Economic Inequality, Volume 17),
171–202.

Elbers, B. (2019). A Method for Studying Difference in Segregation
Levels Across Time and Space. SocArXiv Working Paper.
<https://osf.io/preprints/socarxiv/ya7zs/>
Elbers, B. (2021). A Method for Studying Differences in Segregation
Across Time and Space. Sociological Methods & Research.
<https://doi.org/10.1177/0049124121986204>

Theil, H. (1971). Principles of Econometrics. New York: Wiley.

Expand Down
3 changes: 2 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Resubmit, fix URL
This release is necessitated by an upcoming change in data.table that
breaks one of the tests of this package.

## Test environments

Expand Down
5 changes: 3 additions & 2 deletions vignettes/segregation.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ For this school, the bootstrap distribution is skewed. If precise inference abou

## Decomposing differences in indices

The command `mutual_difference()` can be used to decompose differences in segregation, as described in Elbers (2019). The default, and recommended method, is to use `method = shapley` (or `method = shapley_detailed`). The other methods (`mrc`, `km`) exist mostly for testing purposes, and are not recommended. Details on the procedure and how to interpret the terms of the decomposition are found in Elbers (2019).
The command `mutual_difference()` can be used to decompose differences in segregation, as described in Elbers (2021). The default, and recommended method, is to use `method = shapley` (or `method = shapley_detailed`). The other methods (`mrc`, `km`) exist mostly for testing purposes, and are not recommended. Details on the procedure and how to interpret the terms of the decomposition are found in Elbers (2021).

```{r}
mutual_difference(schools00, schools05, "race", "school", weight = "n")
Expand All @@ -246,7 +246,8 @@ This method also supports inference by setting `se = TRUE`.

## References

Elbers, B. (2019). A Method for Studying Difference in Segregation Levels Across Time and Space. SocArXiv Working Paper. https://osf.io/preprints/socarxiv/ya7zs/
Elbers, B. (2021). A Method for Studying Differences in Segregation Across Time and Space.
Sociological Methods & Research. https://doi.org/10.1177/0049124121986204

Mora, R., & Ruiz-Castillo, J. (2011). Entropy-based Segregation Indices. Sociological Methodology, 41(1), 159–194. https://doi.org/10.1111/j.1467-9531.2011.01237.x

Expand Down

0 comments on commit b4102f8

Please sign in to comment.