Package: DasGuptR 2.2.0

DasGuptR: Das Gupta Standardisation and Decomposition

Implementation of Das Gupta's standardisation and decomposition of population rates, as set out "Standardization and decomposition of rates: A user’s manual", Das Gupta (1993) <https://www2.census.gov/library/publications/1993/demographics/p23-186.pdf>. The goal of these methods is to calculate adjusted rates based on compositional 'factors' and quantify the contribution of each factor to the difference in crude rates between populations. The package offers functionality to handle various scenarios for any number of factors and populations, where said factors can be comprised of vectors across sub-populations (including cross-classified population breakdowns), and with the option to specify user-defined rate functions.

Authors:Josiah King [aut, cre], Ben Matthews [aut], Prithwis Das Gupta [aut]

DasGuptR_2.2.0.tar.gz
DasGuptR_2.2.0.zip(r-4.7-any)DasGuptR_2.2.0.zip(r-4.6-any)DasGuptR_2.2.0.zip(r-4.5-any)
DasGuptR_2.2.0.tgz(r-4.6-any)DasGuptR_2.2.0.tgz(r-4.5-any)
DasGuptR_2.2.0.tar.gz(r-4.7-any)DasGuptR_2.2.0.tar.gz(r-4.6-any)
DasGuptR_2.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
DasGuptR/json (API)

# Install 'DasGuptR' in R:
install.packages('DasGuptR', repos = c('https://josiahpjking.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/josiahpjking/dasguptr/issues

Datasets:

On CRAN:

Conda:

5.56 score 12 stars 345 downloads 11 exports 0 dependencies

Last updated from:3c5de583f7. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK136
source / vignettesOK135
linux-releaseOK127
macos-releaseOK245
macos-oldrelOK127
windows-develOK89
windows-releaseOK79
windows-oldrelOK92
wasm-releaseOK73

Exports:ccwrapdg_checkdg_plotdg_tabledg2popdg354dg611dg612dgccdgnpopsplit_popstr

Dependencies:

Standardization and decomposition with small differences in crude rates
Load packages | Comparing 2004 and 2016 | Uncertainty in comparison between 2004 and 2016 | Comparing 2015 and 2016 | Uncertainty in comparison between 2015 and 2016 | Summary | Footnotes

Last update: 2026-08-04
Started: 2026-08-04

Bootstrapping standardized rates and decomposition effects

Last update: 2025-03-17
Started: 2025-03-17

Category Effects in Das Gupta's decomposition
Category Effects in Das Gupta’s decomposition | Example 5.3, Das Gupta 1993 | Scottish Reconvictions Data

Last update: 2025-03-17
Started: 2025-03-17

Readme and manuals

Help Manual

Help pageTopics
Wrapper for cross-classified data that standardises rates across a pair of populations. Because these are (r+r')/2 * Q(a_i), this requires 1) doing the rate standardisation on each sub-population, 2) performing the standardisation on the cross classified structure variables, 3) multiplying and (optionally) aggregating upccwrap
Performs some initial checks of the input data for dgnpop(), providing messages where issues are flaggeddg_check
Creates a plot of Das Gupta standardised rates across the set of populationsdg_plot
Creates a small table of Das Gupta standardised rates. If no populations are specified, rates will be shown for all available populations. If only two populations (or if two particular populations are specified), then rate-differences and 'decomposition effects' are calculated and presented.dg_table
Standardisation and decomposition of rates over K rate-factors and 2 populations. We suggest using dgnpop, which will internally call this function.dg2pop
Das Gupta equation 3.54. internal function called by dg2pop.dg354
Das Gupta equation 6.11: Standardises rates across populationsdg611
Das Gupta equation 6.12 for a differences between 2 populations when standardised across N populations.dg612
Das Gupta equation 5.36 across N populations: Decomposes cross-classified population structures into a set of symmetric proportions indicating contribution of individual structural variables.dgcc
Das Gupta Example 2.1dgeg2_1
Das Gupta Example 2.2dgeg2_2
Das Gupta Example 2.3dgeg2_3
Das Gupta Example 2.4dgeg2_4
Das Gupta Example 3.1dgeg3_1
Das Gupta Example 4.1dgeg4_1
Das Gupta Example 4.3dgeg4_3
Das Gupta Example 4.4dgeg4_4
Das Gupta Example 5.1dgeg5_1
Das Gupta Example 5.3dgeg5_3
Das Gupta Example 6.5dgeg6_5
Das Gupta Example 6.6: US Population Birth Ratesdgeg6_6
Prithwis Das Gupta's 1993 standardisation and decomposition of rates over K rate-factors and N populations.dgnpop
Scottish Reconvictions data 2004-2016reconv
Das Gupta equation 5.36 for a single population: Decomposes cross-classified population structures into a set of symmetric proportions indicating contribution of individual structural variables.split_popstr