Added tryCatch loop to Kalman so that auto.arima model is called if structTS spits failure to converge message. Not sure if it will fail to reach your error messaging regarding the 5% rule based on the tryCatch interruption. May want to add that into the error messaging.
Added tryCatch loop to Kalman so that auto.arima model is called if structTS spits failure to converge message. Not sure if it will fail to reach your error messaging regarding the 5% rule based on the tryCatch interruption. May want to add that into the error messaging.