A small package for joint calibration of totals and quantiles for probability and non-probability surveys as well as causal inference based on observational data. 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:
Further plans:
sampling::gencalib,For details see:
Work on this package is supported by the the National Science Centre, OPUS 22 grant no. 2020/39/B/HS4/00941.
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")
install.packages("jointCalib", repos = c('https://ncn-foreigners.r-universe.dev', 'https://cloud.r-project.org'))