Fits a robust state space model by minimizing a trimmed loss function as per Crevits and Croux (2018). A fixed proportion of the largest residuals are excluded from the objective, providing robustness against extreme outliers. The predicted observations used in the trimmed loss are computed using the Huber robust filter from Cipra and Romera (1997).
Usage
trimmed_robust_SSM(
y,
init_par,
build,
alpha,
lower = NA,
upper = NA,
control = list(parscale = init_par)
)Arguments
- y
A numeric matrix of observations (time points in rows).
- init_par
A numeric vector of initial parameter values.
- build
A function that returns a
dlmmodel given a parameter vector. Thespecify_SSM()function can be used to create thisbuildfunction.- alpha
Numeric value in the interval [0, 1) indicating the trimming proportion (i.e., the proportion of data to exclude as outliers).
- lower
Optional numeric vector of lower bounds for parameter estimation. Defaults to
-Inf. Must be of same length asinit_par.- upper
Optional numeric vector of upper bounds for parameter estimation. Defaults to
Inf. Must be of same length asinit_par.- control
Optional list of control parameters passed to
optim. Default islist(parscale = init_par), which can help the optimizer if parameters are on vastly different scales.
Value
An object of class trimmed_robust_SSM containing the optimization result, trimming level \(\alpha\), the original data, and the original build function.
References
Crevits R. and Croux C. (2018). Robust Estimation of Linear State Space Models. *Communications in Statistics: Simulation and Computation*
Cipra, T., Romera, R. (1997). Kalman filter with outliers and missing observations. *Test* 6, 379–395. https://doi.org/10.1007/BF02564705
