Skip to contents

Details

A small package for joint calibration of totals and quantiles (see Beręsewicz and Szymkowiak (2023) working paper for details). The package combines the following approaches:

which allows to calibrate weights to known (or estimated) totals and quantiles jointly. As an backend for calibration sampling (sampling::calib), laeken (laeken::calibWeights), survey (survey::grake) or ebal (ebal::eb) package can be used. One can also apply empirical likelihood using codes from Wu (2005) with support of stats::constrOptim as used in Zhang, Han and Wu (2022).

backend method function called
sampling c("raking", "linear", "logit", "truncated") sampling::calib
laeken c("raking", "linear", "logit") laeken::calibWeights
survey c("raking", "linear", "logit", "sinh") survey::grake
ebal eb ebal::eb
base el R code and stats::constrOptim

Currently supports:

  • calibration of quantiles,
  • calibration of quantiles and totals,
  • calibration using standard calibration, empirical likelihood and entropy balancing method,
  • covariate distribution entropy balancing for ATT and QTT (distributional entropy balancing; DEB),
  • covariate distribution balancing propensity score for ATE and QTE (distributional propensity score; DPS).

Further plans:

  • generalized calibration via sampling::gencalib,
  • calibration for Gini and other metrics,

Funding

Work on this package is supported by the the National Science Centre, OPUS 22 grant no. 2020/39/B/HS4/00941.

Installation

You can install CRAN version of the package using

install.packages("jointCalib")

You can install the development version of jointCalib from GitHub with:

# install.packages("remotes")
remotes::install_github("ncn-foreigners/jointCalib")