How to use Kalman filter to extract TWO unobserved variables that follow specific processes in RBetter estimation of Homography using Kalman filter?Explain process noise terminology in Kalman FilterVariable time step in Kalman FilterUsing Kalman filter with acceleration and position inputsIntroduction of exogenous variables in a state space model in R with DLM packageMultivariate State Space model in r (dlmodeler)R dlm library: model definitionKalman filter - Measurement and process noiseHow to simulate the posterior filtered estimates of a Kalman Filter using the DSE package in RHow to adjust an odd behaving Hessian to calculate standard errors with optim

Does recycling lead to less jobs?

What can players do while waiting for a troll to regenerate?

Coworkers accusing me of "cheating" for working more efficiently

Is there a name for the phenomenon of false positives counterintuitively outstripping true positives

Why are one-word titles so dominant in books, film, and games?

Why do some web servers still provide information on vendor and version in the HTTP response headers

How do the other crew members know the xenomorph is "big", if they haven't seen it?

Is it safe to plug one travel adapter into another?

What's the origin of the trope that dragons used to be common but aren't any more?

Coordinate system for space

Why do the Romance languages use definite articles, when Latin doesn't?

As tourist in China do I have to fear consequences for having publicly liked South Park?

Is there a high level reason why the inverse square law of gravitation yields periodic orbits without precession?

In the Cl vs Cd graph, Why the drag coefficient decreases initially with the small increment in lift coefficient?

How can I adjust nth number in a line?

Can you put L trominos to fill the figure?

Would there be a difference between boiling whole black peppercorns or fine ground black pepp in a stew?

instead of pressurizing an entire spacesuit with oxygen could oxygen just pressurize the head and the rest of the body be pressurized with water?

What’s the difference between 实在 and 确实?

Company asks (more than once) if I can involve family members in project

Take-Home Examination on Ordinary Differential Equations?

How can I better manage memory usage when defining functions?

Moisture leaking out of chip in floor tile

Make a haystack (with a needle)



How to use Kalman filter to extract TWO unobserved variables that follow specific processes in R


Better estimation of Homography using Kalman filter?Explain process noise terminology in Kalman FilterVariable time step in Kalman FilterUsing Kalman filter with acceleration and position inputsIntroduction of exogenous variables in a state space model in R with DLM packageMultivariate State Space model in r (dlmodeler)R dlm library: model definitionKalman filter - Measurement and process noiseHow to simulate the posterior filtered estimates of a Kalman Filter using the DSE package in RHow to adjust an odd behaving Hessian to calculate standard errors with optim






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









0

















I am reproducing the model built in Coche, Liam, Sahakyan (2015) in R.



See the paper: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=2ahUKEwiMnO3M3qXhAhUJwMQBHfCECZcQFjACegQIAhAB&url=https%3A%2F%2Fwww.sciencedirect.com%2Fscience%2Farticle%2Fpii%2FS2212567115011144%2Fpdf%3Fmd5%3Db191d8e7fafbf9af2fbfed2a6c6e06e3%26pid%3D1-s2.0-S2212567115011144-main.pdf%26_valck%3D1&usg=AOvVaw2LrfiVn1lcuqpm8sZmrvuD.



The model consists of estimating yield curve factors using Nelson-Siegel model and then extracting unobserved "regional" and "country-specific" factors (or betas). The first step is straightforward, while I am struggling with deriving unobserved factors in R using Kalman filter (as the Coche et al. propose).



I have read the documentation of dlm package (https://cran.r-project.org/web/packages/dlm/dlm.pdf) which is supposed to be the most convenient for Kalman filtering in R. There is a function dlmFilter() which estimates filtered values but needs a model of unobserved variable to be specified. There is an assumption that regional factors follow AR-X(1) process (with US Treasuries factors as exogenous variables), while country-specific factors follow AR(1) process.



The question is how could I specify these models for unobserved variables in dlmFilter() function?



# As I understand, this is how I can derive some unobserved variable
# which affects the observed variable y using **dlm** package.
# According to the documentation,
# dlmModPloly(1) creates the first-order polynomial model so
# that the unobserved follow a random walk process. But how to create the model in
# Coche et al. (2015)?
# Note: in the code x is an object that contains information
# about filtering results.

x <- dlmFilter(y, dlmModPoly(1))


I expect to receive two time series of regional factors and country-specific factors that could be used for forecasting the observed yield curve factor. I am ready to use another package if necessary, but I started with dlm because it is quite popular and easy in use.



I would be grateful for any help!










share|improve this question
































    0

















    I am reproducing the model built in Coche, Liam, Sahakyan (2015) in R.



    See the paper: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=2ahUKEwiMnO3M3qXhAhUJwMQBHfCECZcQFjACegQIAhAB&url=https%3A%2F%2Fwww.sciencedirect.com%2Fscience%2Farticle%2Fpii%2FS2212567115011144%2Fpdf%3Fmd5%3Db191d8e7fafbf9af2fbfed2a6c6e06e3%26pid%3D1-s2.0-S2212567115011144-main.pdf%26_valck%3D1&usg=AOvVaw2LrfiVn1lcuqpm8sZmrvuD.



    The model consists of estimating yield curve factors using Nelson-Siegel model and then extracting unobserved "regional" and "country-specific" factors (or betas). The first step is straightforward, while I am struggling with deriving unobserved factors in R using Kalman filter (as the Coche et al. propose).



    I have read the documentation of dlm package (https://cran.r-project.org/web/packages/dlm/dlm.pdf) which is supposed to be the most convenient for Kalman filtering in R. There is a function dlmFilter() which estimates filtered values but needs a model of unobserved variable to be specified. There is an assumption that regional factors follow AR-X(1) process (with US Treasuries factors as exogenous variables), while country-specific factors follow AR(1) process.



    The question is how could I specify these models for unobserved variables in dlmFilter() function?



    # As I understand, this is how I can derive some unobserved variable
    # which affects the observed variable y using **dlm** package.
    # According to the documentation,
    # dlmModPloly(1) creates the first-order polynomial model so
    # that the unobserved follow a random walk process. But how to create the model in
    # Coche et al. (2015)?
    # Note: in the code x is an object that contains information
    # about filtering results.

    x <- dlmFilter(y, dlmModPoly(1))


    I expect to receive two time series of regional factors and country-specific factors that could be used for forecasting the observed yield curve factor. I am ready to use another package if necessary, but I started with dlm because it is quite popular and easy in use.



    I would be grateful for any help!










    share|improve this question




























      0












      0








      0








      I am reproducing the model built in Coche, Liam, Sahakyan (2015) in R.



      See the paper: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=2ahUKEwiMnO3M3qXhAhUJwMQBHfCECZcQFjACegQIAhAB&url=https%3A%2F%2Fwww.sciencedirect.com%2Fscience%2Farticle%2Fpii%2FS2212567115011144%2Fpdf%3Fmd5%3Db191d8e7fafbf9af2fbfed2a6c6e06e3%26pid%3D1-s2.0-S2212567115011144-main.pdf%26_valck%3D1&usg=AOvVaw2LrfiVn1lcuqpm8sZmrvuD.



      The model consists of estimating yield curve factors using Nelson-Siegel model and then extracting unobserved "regional" and "country-specific" factors (or betas). The first step is straightforward, while I am struggling with deriving unobserved factors in R using Kalman filter (as the Coche et al. propose).



      I have read the documentation of dlm package (https://cran.r-project.org/web/packages/dlm/dlm.pdf) which is supposed to be the most convenient for Kalman filtering in R. There is a function dlmFilter() which estimates filtered values but needs a model of unobserved variable to be specified. There is an assumption that regional factors follow AR-X(1) process (with US Treasuries factors as exogenous variables), while country-specific factors follow AR(1) process.



      The question is how could I specify these models for unobserved variables in dlmFilter() function?



      # As I understand, this is how I can derive some unobserved variable
      # which affects the observed variable y using **dlm** package.
      # According to the documentation,
      # dlmModPloly(1) creates the first-order polynomial model so
      # that the unobserved follow a random walk process. But how to create the model in
      # Coche et al. (2015)?
      # Note: in the code x is an object that contains information
      # about filtering results.

      x <- dlmFilter(y, dlmModPoly(1))


      I expect to receive two time series of regional factors and country-specific factors that could be used for forecasting the observed yield curve factor. I am ready to use another package if necessary, but I started with dlm because it is quite popular and easy in use.



      I would be grateful for any help!










      share|improve this question















      I am reproducing the model built in Coche, Liam, Sahakyan (2015) in R.



      See the paper: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=2ahUKEwiMnO3M3qXhAhUJwMQBHfCECZcQFjACegQIAhAB&url=https%3A%2F%2Fwww.sciencedirect.com%2Fscience%2Farticle%2Fpii%2FS2212567115011144%2Fpdf%3Fmd5%3Db191d8e7fafbf9af2fbfed2a6c6e06e3%26pid%3D1-s2.0-S2212567115011144-main.pdf%26_valck%3D1&usg=AOvVaw2LrfiVn1lcuqpm8sZmrvuD.



      The model consists of estimating yield curve factors using Nelson-Siegel model and then extracting unobserved "regional" and "country-specific" factors (or betas). The first step is straightforward, while I am struggling with deriving unobserved factors in R using Kalman filter (as the Coche et al. propose).



      I have read the documentation of dlm package (https://cran.r-project.org/web/packages/dlm/dlm.pdf) which is supposed to be the most convenient for Kalman filtering in R. There is a function dlmFilter() which estimates filtered values but needs a model of unobserved variable to be specified. There is an assumption that regional factors follow AR-X(1) process (with US Treasuries factors as exogenous variables), while country-specific factors follow AR(1) process.



      The question is how could I specify these models for unobserved variables in dlmFilter() function?



      # As I understand, this is how I can derive some unobserved variable
      # which affects the observed variable y using **dlm** package.
      # According to the documentation,
      # dlmModPloly(1) creates the first-order polynomial model so
      # that the unobserved follow a random walk process. But how to create the model in
      # Coche et al. (2015)?
      # Note: in the code x is an object that contains information
      # about filtering results.

      x <- dlmFilter(y, dlmModPoly(1))


      I expect to receive two time series of regional factors and country-specific factors that could be used for forecasting the observed yield curve factor. I am ready to use another package if necessary, but I started with dlm because it is quite popular and easy in use.



      I would be grateful for any help!







      r kalman-filter state-space






      share|improve this question














      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 28 at 21:39









      MaximMaxim

      82 bronze badges




      82 bronze badges

























          0






          active

          oldest

          votes













          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );














          draft saved

          draft discarded
















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55407244%2fhow-to-use-kalman-filter-to-extract-two-unobserved-variables-that-follow-specifi%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown


























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55407244%2fhow-to-use-kalman-filter-to-extract-two-unobserved-variables-that-follow-specifi%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown









          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript