sae.fay_herriot_mse
Per-area EBLUP estimates and their mean squared error (Prasad-Rao) from a fitted Fay-Herriot model -- the model output of sae.fay_herriot or sae.all_subsets_fh. Adds the standard error ratio, the relative efficiency versus the direct estimate, residuals, and the synthetic (regression-only) prediction. Nothing is refitted: the model carries the coefficients, their covariance, and the between-area variance with its asymptotic variance and bias, which is everything an area's MSE needs beyond its own sampling variance and covariates.
Areas without a direct estimate (a missing target or sampling variance, or a table with neither column) get the synthetic prediction as FH_est and no MSE.
- Kind:
standard - Network: no
Inputs🔗
| Name | Type | Description |
|---|---|---|
data | file (Parquet or CSV) | One row per area, with the model's predictor columns and, where available, the direct estimate and its sampling variance under the names the model was fitted with. |
model | file (SpadeModel) | A fay_herriot model. |
id_columns | string | Column selector for identifier columns to carry through unchanged, e.g. STATECD,COUNTYCD,COUNTYNM,surveyunit. Default empty. |
na_action | string | An area with a missing predictor: fail (default), drop, or keep it with missing estimates. |
Outputs🔗
| Name | Type | Description |
|---|---|---|
estimates | file (Parquet or CSV, as the input) | One row per area: the id columns, then direct_est, direct_var, FH_est (EBLUP), FH_mse, RE (= FH_mse / direct_var), SER (= sqrt(RE)), resid (= FH_est - direct_est), and syn_pred. |
summary | json | method, refvar, n_areas, n_with_direct, mean_ser, mean_re. |
Example🔗
- id: "@estimates"
name: sae.fay_herriot_mse
inputs:
- block: "@long_data"
output: result
as: data
- block: "@selection"
output: model
as: model
args:
id_columns: "STATECD,COUNTYCD,COUNTYNM,surveyunit"