sae.all_subsets_fh All-possible-subsets model selection for Fay-Herriot area-level models. Enumerates every subset (up to max_predictors) of the candidate features, fits each with Fisher-scoring EBLUP, keeps the k_best per predictor count by AIC, and selects the minimum-AIC model whose coefficients are all significant at alpha. Non-converging or singular fits are skipped, not fatal. The selected model is written fitted, so its model output feeds sae.fay_herriot_mse directly.
Kind: standardNetwork: noName Type Description datafile (Parquet or CSV) One row per area, with the target, candidate predictor and sampling-variance columns. targetstring The direct-estimate column. featuresstring Column selector for the candidate pool, e.g. B15,B20,B25,B30,B35,MB15,MB20,MB25,MB30,MB35 or B*,MB*,-B5,-MB5. vardirstring Name of the column holding each area's sampling variance. interceptboolean Include an intercept. Default false. id_columnsstring Column selector for identifier columns, never used as predictors. Default empty. categoricalstring Column selector for numeric-coded predictors to treat as categorical. Default empty. na_actionstring fail (default) or drop: what to do with an area that has a missing value in a model column.methodstring Variance estimation method - one of REML (default), ML, or FH. k_bestnumber Keep the k best models (by AIC) per predictor count. Default 5. max_predictorsnumber Largest subset size to consider, clamped to the number of candidates. Default 5. alphanumber Significance threshold: a model qualifies only if every coefficient has p < alpha. Default 0.01. max_iternumber Maximum Fisher-scoring iterations per fit; non-converging fits are retried once at twice this. Default 500.
Outputs🔗 Name Type Description rankingfile (CSV) The k_best models per predictor count, sorted by AIC: p, rank, predictors, aic, all_signif, max_pvalue. modelfile (SpadeModel) The selected model, fitted (family fay_herriot). fitjson The selected model's fit statistics, and selection: predictors, aic, alpha, k_best, max_predictors, candidates.
Example🔗 - id : " @selection "
name : sae.all_subsets_fh
inputs :
- " @long_data "
args :
target : " estimate "
features : " B15,B20,B25,B30,B35,MB15,MB20,MB25,MB30,MB35 "
vardir : " var_of_estimate "
max_predictors : 3
alpha : 0.05 ← Previous sae.hello_world Next → sae.fay_herriot_mse