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: standard
  • Network: no

Inputs🔗

NameTypeDescription
datafile (Parquet or CSV)One row per area, with the target, candidate predictor and sampling-variance columns.
targetstringThe direct-estimate column.
featuresstringColumn selector for the candidate pool, e.g. B15,B20,B25,B30,B35,MB15,MB20,MB25,MB30,MB35 or B*,MB*,-B5,-MB5.
vardirstringName of the column holding each area's sampling variance.
interceptbooleanInclude an intercept. Default false.
id_columnsstringColumn selector for identifier columns, never used as predictors. Default empty.
categoricalstringColumn selector for numeric-coded predictors to treat as categorical. Default empty.
na_actionstringfail (default) or drop: what to do with an area that has a missing value in a model column.
methodstringVariance estimation method - one of REML (default), ML, or FH.
k_bestnumberKeep the k best models (by AIC) per predictor count. Default 5.
max_predictorsnumberLargest subset size to consider, clamped to the number of candidates. Default 5.
alphanumberSignificance threshold: a model qualifies only if every coefficient has p < alpha. Default 0.01.
max_iternumberMaximum Fisher-scoring iterations per fit; non-converging fits are retried once at twice this. Default 500.

Outputs🔗

NameTypeDescription
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).
fitjsonThe 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