BookmarkSubscribeRSS Feed
SASingaKorean
Calcite | Level 5

Hi, I want to write a code for extended Kalman filter. I know SAS has subroutine such as KALCVF but this subroutine is for a standard linear Kalman filter. The observation equation that I am trying to deal with has non-linear and time-varying coefficients that depends on the value of the previous state variables and observation variables. Specifically, my extended Kalman filter is 

 

X_t = a X_t-1 + error (State Equation)

Y_t = f(Y_t-1, X_t-2) X_t-1 + error (Observation Equation),

 

where f is a quadratic function. 

 

I think there is no way to use subroutine for run this Kalman filter. Probably, I need to write a code from scratch. If anyone had similar experience, please help me with this problem. 

 

Thank you

 

 

3 REPLIES 3
Ksharp
Super User

Do you have SAS/IML. In it there are a couple of call subroutine/function about Kalman filter .

Or @Rick_SAS  could give you a hint .

SASingaKorean
Calcite | Level 5
Thanks for reply. I I have SAS/IML. Like I mentioned, the subroutine provided by SAS/IML is for standard linear Kalman Filters. I am trying to deal with Extended Kalman Filters, which linearize non-linear Kalman Filter equations. The reason I can't apply subroutine provided by SAS/IML is that the coefficients in my equations are time-varying which depends on the previous state variables (x_t-2) and measurement variables (y_t-1).

I probably need to write a code from scratch. However, I do not have sophisticated skills that I can write a complicated code. That is, why I am trying to ask for advice in this community.

Anyways, thanks for your reply!
Ksharp
Super User

Ha. I don't know if @Rick_SAS have interesting to write some IML code for you .

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 708 views
  • 0 likes
  • 2 in conversation