Changelog
interflex 1.4.1.9000
Development version, not yet on CRAN.
- Boosting learners in the DML estimator (
model.y = "hgb",model.t = "hgb") no longer flood the console with LightGBM’s “No further splits with positive gain” warnings when no learner parameters are supplied.
interflex 1.4.1
CRAN v1.4.1, released 2026-09-20.
Kernel adaptive bandwidth fixed: the normalizer is now the geometric mean of the moderator’s density at the observations (Abramson’s rule) instead of over the whole density grid. This fixes “subscript out of bounds” and “$ operator is invalid” errors on moderators with gaps or long tails.
Wider windows at a fixed
bw: with a fixedbw, kernel windows are now wider than in 1.4.0 (typically 1.5-3x on well-behaved moderators); results under the default cross-validatedbwchange little.Degenerate local fits: kernel local fits that are unidentified, fail, or have no usable kernel weights are now dropped with a warning, or the call stops with a clear “Inappropriate bandwidth” error, instead of being filled with zeros or crashing. Cross-validation can no longer silently return
bw = -Inf, and an invalidbwis rejected with an error.interflex()no longer sets the global optioninterflex.uniform_ci_warned.inter.test()now documents its return value.interflex()gainsbw.select,bw.se.multandbw.ess.min, which expose the bandwidth selection rules of the kernel estimator ("cv.min", the default;"cv.1se";"cv.1se.ess";"ess") and pass them, together withbw, through to the kernel smoothing step of the lasso estimator with a continuous treatment. Usebw.select = "cv.1se"when cross-validation cannot separate the candidate bandwidths.citation("interflex")now lists the methods paper (Hainmueller, Mummolo and Xu 2019), the practical guide to the modern estimators (Liu, Liu and Xu, arXiv:2504.01355, forthcoming as a Cambridge Element), and the package.
interflex 1.4.0
GATE support across estimators:
gate = TRUEnow works withlinear,lasso,dml, andgrfestimators. When the moderator \(X\) is discrete, settinggate = TRUEestimates Group Average Treatment Effects (GATE) within each level of \(X\). Useplot(out, by.group = TRUE)to visualize GATE with separate point estimates and confidence intervals per group.Unified
g.estoutput: All estimators withgate = TRUEproduce a unified$g.estfield. The DML-specific$g.est.dmlis retained as a deprecated alias for backward compatibility.Auto-trim
xlim: Whenxlimis not specified and \(X\) is continuous, the plot automatically clips tails where the data is too sparse to support reliable CME estimation. Tails are only clipped if they have fewer than 10 observations or lack treatment variation. Users can always override with an explicitxlim.Default y-axis labels: Changed from “Marginal Effect of D on Y” to “CME of D on Y” (smooth curves) or “GATE of D on Y” (group-level plots with
by.group = TRUE).New datasets: Added
app_adiguzel2023(Adiguzel et al. (2023)),app_bb2024(Beiser-McGrath and Bernauer (2024)), andapp_et2023(Egerod and Tran (2023)) to the package data.Parallel computing: Switched from
%dopar%to%dorng%(via thedoRNGpackage) for reproducible parallel random number generation. The “Parallel computing” message now only prints when parallel is actually used.Quarto book: Restructured user manual with numbered chapters, separated computation from figure chunks, and added sections on GATE estimation in Ch. 3 (linear), Ch. 4 (lasso), and Ch. 5 (DML).
ggplot2 compatibility: Fixed deprecated
size→linewidth,guides(colour = FALSE)→guides(colour = "none"), and removedaes_string()usage.
interflex 1.3.5
Introduce the Lasso estimators.
Bug fixes and improvements.
interflex 1.3.1–1.3.2
Introduce the DML estimators.
Fix bugs.
interflex 1.3.0
Add support for DML estimators.
Replace
fastplmwithfixestfor estimating fixed effects models.Add analytical standard errors for the kernel estimator.
interflex 1.2.1
Support GLM link functions (logit, probit, poisson, negative binomial) for linear, binning, and kernel estimators.
More flexible uncertainty estimation: simulation, delta method, and bootstrap.
Add
Z.refoption for specifying covariate values when computing marginal effects.Incorporate estimation of average treatment effects (ATE) and average marginal effects (AME).
Support four cross-validation criteria for binary outcomes: MSE, MAE, Cross Entropy, AUC.
Add likelihood ratio test and Wald test for the binning estimator.
Add fully moderated model via
full.moderate = TRUE.
interflex 1.1.1
- Add
inter.testfunction to test the difference in treatment effects at specific moderator values.
interflex 1.1.0
Support discrete treatments with more than 2 arms.
Adaptive bandwidth search and optimized cross-validation with fixed effects.
Unified
interflex()function replacing deprecatedinter.binningandinter.kernel.Add
predictfunction for expected values of \(Y\).Add
diff.valuesoption for testing treatment effect differences.