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:
- Deville, J. C., and Särndal, C. E. (1992). Calibration estimators in survey sampling. Journal of the American statistical Association, 87(418), 376-382.
- Harms, T. and Duchesne, P. (2006). On calibration estimation for quantiles. Survey Methodology, 32(1), 37.
- Wu, C. (2005) Algorithms and R codes for the pseudo empirical likelihood method in survey sampling, Survey Methodology, 31(2), 239.
- Zhang, S., Han, P., and Wu, C. (2023) Calibration Techniques Encompassing Survey Sampling, Missing Data Analysis and Causal Inference, International Statistical Review 91, 165–192.
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")