You can also look at a state-space model, I developed almost 20 years ago, that can directly output what you need. The model is now used in a tool DeST developed by Tsinghua University, China.
Tianzhen