does anyone know where I can find a Gauss code for an Extended Kalman Filter state space model?
GAUSS does not currently have an internal extended Kalman filter program. However, there are a number of third-party sources have implemented Kalman filter state-space models using GAUSS. Though this does not represent an exhaustive list you may find useful code for download from one of the following:
- John Hamilton at http://econweb.ucsd.edu/~jhamilto/software.htm
- CJ-Kim and Charles Nelson at http://econ.korea.ac.kr/~cjkim/
- Thierry Roncalli at http://www.thierry-roncalli.com/#gauss
Keep in mind that most of these codes will need adapting to fit your specific model. However, they all offer some foundation for building your model.
I wrote Gauss (and Matlab) codes for linear Kalman filter and also for UKF, both standard versions as well as square-root and UD implementations. I have not done EKF, but it is pretty much the same as a standard KF where you need a first-order Taylor approximation for the non-linear function either in the state equation or in the measurement equation (or in both). The derivatives depend on the function specifications, so either you tell Gauss to calculate numerical derivatives, or if the function is not very complicated you can write a code for the analytical derivative. Once you have that, you can use a linear KF, you only to define correctly the coefficient matrices.
However, I recommend the use of UKF as it overperforms EKF.
thanks a lot for your answer. Yes I have also done the standard KF in both Gauss and Matlab and I have written down all the theory for the equations of the EKF. Just I have some trouble putting it in the code, even if it is a simple addition.
Is it possible by any chance that I have a look at your Gauss code for the UKF?
If not, dont worry, thanks anyways.
No problem at all, I'll put my KF libraries on my website after finishing and organising all files anyway. Is it very urgent? I'm asking because I've created pretty recently the UKF code and I still need to test and correct it. However, if you are interested, I can send you my Matlab codes for UKF as I have done everything in Matlab first and I'm now converting them to Gauss as I prefer Gauss' optimisation methods.
If you are ok with the Matlab code, give me your email address and I'll send it to you.
Unfortunately, I am struggling with a deadline yes, 🙁 So I could have a look now at the Matlab code and do some progress with that one. I have done the going back and forward between matlab and Gauss so may be I dont even need to bother you with the Gauss version of the code. I cant thank you enough for this 🙂
My email address is email@example.com
I sent an email to the above address with code.
Now I research UKF ,but I find some code on website that don't have 'input'.
Can you get your UKF code?
My email address is firstname.lastname@example.org