Skip to content

ncn-foreigners/nonprobsvy-coverage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nonprobsvy-coverage

Coverage simulations for the nonprobsvy R package, modeled after DoubleML/doubleml-coverage.

The rendered site lives at https://ncn-foreigners.ue.poznan.pl/nonprobsvy-coverage/.

What's here

The repo is a small internal R package (nonprobcover) plus YAML-driven simulation scripts. Each script writes a *_coverage.csv to results/<family>/, and a matching Quarto page in doc/<family>/ reads it to render a color-coded coverage table.

path purpose
R/ the nonprobcover helper package — driver, metrics, DGPs
scripts/<family>/<name>.R + <name>_config.yml one simulation per file pair
results/<family>/ committed CSVs — the canonical artifact, regenerated by CI
doc/<family>/<name>.qmd one Quarto page per script
_quarto.yml, index.qmd website root
.github/workflows/ GitHub Actions: run sims, commit results, render & deploy

Quick start (local)

R CMD INSTALL --no-help --no-html --no-byte-compile .
Rscript scripts/ipw/ipw_mle.R
quarto render
open _site/doc/ipw/ipw_mle.html

Status: spike

The first pass implements one estimator (IPW MLE) on a small custom DGP, end to end: local sim → CSV → Quarto table → GitHub Actions → GitHub Pages. Every later piece of work is additive — add a DGP file in R/, add a script + config + qmd, run.

Next milestones (see plan in commit history):

  1. Port DGPs from ncn-foreigners/software-tutorials for Chen 2020, Yang 2020, Kim 2021, Yang 2021, Chen 2022.
  2. Add the rest of the IPW family (GEE, SCAD/lasso/MCP).
  3. Add the MI family (glm, nn, pmm, npar).
  4. Add the DR family + bootstrap variance with a reduced budget.

Conventions

  • Dependencies are kept small: data.table, yaml, survey, sampling, nonprobsvy, Rcpp. No tidyverse.
  • Parallelism uses base parallel::mclapply (fork — Linux/macOS only); Windows falls back to sequential. Controlled by NPC_WORKERS.
  • CSV schema is one row per parameter cell × alpha; full schema documented in R/compute_metrics.R.
  • Coverage cells in the rendered tables are colored green/amber/red against the Monte Carlo SE of the coverage estimate (see R/flag_coverage.R).

Acknowledgements

This repository is inspired by DoubleML/doubleml-coverage (live site), which provides the same kind of automated coverage evidence for the DoubleML Python and R packages. We mirror its overall architecture (YAML-driven sim scripts → CSV results → Quarto website → GitHub Actions), adapted to R and to the estimators implemented in nonprobsvy.

Funding

This work is supported by the National Science Centre, Poland, OPUS 20 grant no. 2020/39/B/HS4/00941.

About

Coverage simulations for the nonprobsvy R package — inspired by DoubleML/doubleml-coverage

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages