Changelog
Source:NEWS.md
ineqx 0.5.0
Breaking changes
The bundled
cps_sampledataset (real CPS microdata) is replaced byearnings_panel, a smaller synthetic two-wave panel with CPS-style variables (earnweek,earnwt,educ,ses,mother,post,decade, …). Its data-generating process is documented increate/create_earnings_panel.Rand uses stratified draws so that the examples give smooth, interpretable results. README, vignettes, and tests now useearnings_panel.The causal decomposition now targets marginal counterfactual inequality by default, rather than residual (conditional) inequality. Within-group variance is computed by the law of total variance over the covariate distribution of the treated within each group: the average conditional residual variance plus the dispersion of predicted conditional means across covariate profiles. Control variables that adjust the counterfactual predictions therefore contribute to within-group inequality. When the model contains no within-group control variation, the marginal and residual results coincide, so analyses without controls are unaffected.
New features
- New
estimandargument onineqx()andineqx_params():"marginal"(default) or"residual". The"residual"variant reproduces the previous behavior (conditional scale parameter only, omitting the predicted-mean dispersion term). The chosen estimand is recorded on the params/result objects and shown byprint(). - Marginal delta-method standard errors use a numerical Jacobian of the full prediction + g-computation routine (the marginal group variance is nonlinear in both the mean- and scale-equation coefficients); the residual variant keeps the fast analytical Jacobian. The bootstrap path honors
estimandthroughout. The marginal Jacobian is evaluated with incremental finite differences (each coefficient perturbation is a rank-1 update of the cached predictions), making it O(N * p) rather than O(N * p^2) – nearly as fast as the analytical path even for models with large coefficient counts.
ineqx 0.4.0
Breaking changes
- Merged
ineq()andineqx()into a singleineqx()function- If no
treatis specified: descriptive decomposition (wasineq()) - If
treatis specified orparamsprovided: causal decomposition
- If no
-
ineq()removed — useineqx()withouttreatinstead -
yis now a separate argument (character, column name indata);formula_muis now one-sided (likeformula_sigma) -
boot_config()now requiresyargument and one-sidedformula_mu - Default
orderchanged fromc("behavioral", "compositional", "pretreatment")to"shapley" - Argument order:
y, ystat, treat, post, group, time, ref, order, formula_mu, formula_sigma, params, weights, se, data - Renamed modes: “Mode A” → “integrated estimation”, “Mode B” → “externally estimated model”
Improvements
- Fully parallel argument structure: descriptive and causal paths share
y,group,time,ref,ystat,order,data - Public API reduced to 2 main functions:
ineqx()andineqx_params()
ineqx 0.3.0
Breaking changes
- Streamlined to 3 user-facing functions:
ineq(),ineqx(),ineqx_params() -
desc_decompose()replaced byineq()with enhanced counterfactual decomposition -
extract_params()merged intoineqx_params(model = ...) -
causal_decompose_cross(),causal_decompose_longit(),causal_shapley(),fit_ineqx_model()are now internal -
ineqx()se_method/bootarguments replaced by unifiedseargument:"delta"(default),"none", orboot_config()object -
ineqx()no longer returnsineqx_resultwrapper; returns decomposition object directly
New features
-
ineq(): descriptive W/B decomposition with counterfactual parameter-switching decomposition (mu, sigma, pi) and Shapley averaging -
ineqx()integrated estimation: GAMLSS fitting viaformula_mu/formula_sigma/dataarguments -
order = "shapley"supported for ordering-robust decomposition -
ineqx_params()accepts either manual data.frame or fitted gamlss model (viamodelarg)
ineqx 0.2.0
Changes
- Complete package redesign with new modular architecture
- Old functions removed:
wibe(),calcAME(),plot.ineqx() - Replaced by:
desc_decompose(),extract_params(), new S3 plot methods - The
c./i.variable prefix convention has been removed; use plain column names -
zeallotdependency removed;gamlssmoved fromDependstoSuggests
New features
-
ineqx_params(): Standardized input format that decouples estimation from decomposition. Users can construct parameters from any estimation method. -
causal_decompose_cross(): Cross-sectional causal decomposition (treatment effect on variance = within + between) -
causal_decompose_longit(): Longitudinal causal decomposition with configurable decomposition ordering (6 possible orderings via theorderparameter) -
causal_shapley(): Shapley values averaged across all 6 orderings as robustness check -
desc_decompose(): Clean descriptive within/between decomposition -
extract_params(): Extract decomposition parameters from fitted GAMLSS models -
fit_ineqx_model(): Convenience wrapper for fitting GAMLSS models - Both
Var(variance) andCV2(squared coefficient of variation) supported throughout - Print, summary, and plot methods for all result classes