Package: DasGuptR 2.1.0

Josiah King

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]

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

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

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

Datasets:
  • reconv - Scottish Reconvictions data 2004-2016
  • uspop - US population data 1940-1990

On CRAN:

Conda:

3.23 score 17 scripts 215 downloads 10 exports 0 dependencies

Last updated from:259511ef2b. Checks:4 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK107
source / vignettesOK146
linux-release-x86_64OK105
wasm-releaseOK85

Exports:ccwrapdg_plotdg_tabledg2popdg354dg611dg612dgccdgnpopsplit_popstr

Dependencies:

Bootstrapping standardized rates and decomposition effects

Rendered frombootstrap.html.asisusingR.rsp::asison May 14 2026.

Last update: 2025-04-07
Started: 2025-04-07

Category Effects in Das Gupta's decomposition

Rendered fromcategory_effects.html.asisusingR.rsp::asison May 14 2026.

Last update: 2025-04-07
Started: 2025-04-07

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
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
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
US population data 1940-1990uspop