Page 1 of 1

Help with translate Gauss code into Rats code

Posted: Fri Oct 03, 2014 7:02 pm
by fan
Hi, I am looking for help to translate the attached Gauss code into Rats code. Any help is highly appreciated.

Re: Help with translate Gauss code into Rats code

Posted: Mon Oct 06, 2014 10:25 am
by TomDoan
That's almost never the correct approach. Most of that program is for doing the Kalman filter, which is handled in RATS using DLM, not 200 lines of matrix calculations. What you need to do is to figure out what is being done with the output from the Kalman filter. That appears to be a set of regressions, but what's regressed on what is the key.

Re: Help with translate Gauss code into Rats code

Posted: Thu Oct 09, 2014 11:59 am
by fan
TomDoan wrote:That's almost never the correct approach. Most of that program is for doing the Kalman filter, which is handled in RATS using DLM, not 200 lines of matrix calculations. What you need to do is to figure out what is being done with the output from the Kalman filter. That appears to be a set of regressions, but what's regressed on what is the key.
Thanks, Tom. Actually, what I am interested in is that how they did Fama-MecBeth Two-Pass Regression with the time series data they have. That will be highly appreciated if you would kindly give some suggestions on how to do the two-pass regression in Rats.

Re: Help with translate Gauss code into Rats code

Posted: Fri Oct 10, 2014 9:38 am
by TomDoan
Did they provide the data as well?

Their data is structured as a several collections of data with N (differing from collection to collection) separate series of T data points, where T is the same for all. The Kalman filter factors are generated using one collection of data, and they run various tests based upon a second collection of data.

Re: Help with translate Gauss code into Rats code

Posted: Thu Oct 16, 2014 11:43 am
by fan
TomDoan wrote:Did they provide the data as well?

Their data is structured as a several collections of data with N (differing from collection to collection) separate series of T data points, where T is the same for all. The Kalman filter factors are generated using one collection of data, and they run various tests based upon a second collection of data.
Hi, Tom. I do not have their data. I attached the data and the code I used to replicate the Kalman filter part. Every thing works fine until the two pass regressions. I am looking forward to hearing from you.