Skip to contents

qfmix 0.1.2

Adds the inference layers deferred from 0.1.1, addressing the DSC tail under-coverage directly, plus an applied primer and a reference manual.

  • Documentation. Added an applied primer vignette (“A Primer on Quantile-Function Mixtures and Distributional Synthetic Controls”) that walks social-science researchers through the concepts, data, fitting, interpretation, diagnostics, visualisation, and practical guidance with worked ggplot examples; and a formal PDF reference manual. Both are linked from the package website navbar.

  • Bias-aware DSC bands. dsc(bias_aware = TRUE) (default) widens the bands by the pre-treatment sieve-approximation residual – a conservative bias bound in the spirit of Armstrong & Kolesar (2018) – so coverage no longer collapses in the tails where a finite control mixture cannot represent the treated distribution.

  • Simultaneous (sup-t) bands. qfmix_boot(band = "uniform") and dsc(band = "uniform") return joint bands valid over the whole quantile grid, via the bootstrap max-statistic and the Chernozhukov-Chetverikov-Kato anti-concentration argument the paper invokes (the practical substitute for the exact ridge ball constant).

  • In a Monte-Carlo check, DSC counterfactual coverage rose from 0.69 (variance-only, pointwise) to 0.84 (bias-aware) to 0.97-0.98 (bias-aware + uniform), at the nominal 0.95.

Still deferred: the control-sampling (stochastic-basis) variance and the exact Euclidean-ball anti-concentration constant.

qfmix 0.1.1

Revision after two adversarial reviews. The estimator and the unconstrained numerical bootstrap were verified correct; this release fixes numerics, a performance hot spot, the constrained-bootstrap geometry, and the honesty of the DSC inference claim.

  • Gauss-Legendre quadrature replaces the uniform trapezoid rule for the L-moment integrals – far more accurate, and an open rule that never evaluates the divergent Pareto/GEV bases at the endpoints.
  • O(n_grid * L) covariance kernel. The numerical-bootstrap variance no longer forms a dense n_grid x n_grid Brownian-bridge matrix; a prefix-sum identity gives the same result in linear time.
  • Ridge bootstrap geometry. The constrained bootstrap’s ridge step now uses the same KKT secular ball solution (ridge_ball_solve()) as the estimator, not a naive Euclidean radial clip.
  • Honest DSC bands. dsc() effect bands now include the treated unit’s own quantile sampling error, and the documentation states plainly that v0.1 ships pointwise variance-component bands – the sieve bias term, the control-sampling (stochastic-basis) variance, and the ball anti-concentration correction are deferred, so tail coverage is provisional.
  • Input validation. Empty/all-NA samples, an absent treated unit, no control units, a t0 with no post-period, and an out-of-range trim now error cleanly; plot() guards an empty result.
  • Docs: clarified that the reported L-moments use the orthonormal shifted-Legendre scaling (proportional to, not equal to, Hosking’s classical L-moments); a warning on ill-conditioned monomial bases; lasso/osqp noted as planned.
  • CRAN hygiene: .Rbuildignore keeps the pkgdown site out of the tarball.

qfmix 0.1.0

First release. Sieve quantile-function mixtures and distributional synthetic controls (Alvarez & Orestes 2024).

  • qfmix() fits a mixture of quantile basis functions by sieve generalized method of L-moments: L-moment matching reduces to a convex quadratic program over unconstrained, nonneg, simplex, or ridge weight sets, with an optional grid monotonicity constraint and two-step optimal weighting.
  • Quantile bases: polynomial, legendre (orthonormal shifted Legendre), pareto, gev, and empirical (control quantile functions, for DSC); custom bases via qfmix_basis().
  • qfmix_boot() implements the numerical bootstrap (a simulation from the strong-approximation limit of the quantile process), giving confidence bands for the weights and for the mixture quantile function.
  • dsc() fits a distributional synthetic control: a counterfactual quantile function for a treated unit from control quantile functions, with pointwise confidence bands on the counterfactual and the distributional treatment effect – formal inference that placebo-based methods lack.
  • density() inverts the mixture to a density (Empirical-Bayes f-modelling).
  • S3 methods: print, summary, coef, predict, quantile, plot, density; sim_qmix() simulates from a known quantile mixture.

Notes: this v0.1 ships the QP estimator and the closed-form (unconstrained) and local-QP (constrained) numerical bootstrap. The ridge/ball anti-concentration bands, osqp backend, metalog/Karvanen bases, and Rcpp acceleration are planned.