-
I am new to the pomp package and would like to use it to estimate a nonlinear state-space model where the state-space form is a solution to a Sylvester equation of the form AX + XB = C. The main difficulty so far has been to speed up the code by using the C snippets. It is not entirely obvious to me on how to solve the Sylvester equation within the C snippets. I have proceeded in two steps. Step 1: Call a lapack routine and use it R
Step 2: Integrate Sylvester equation solver within the rprocess
I have not been able to make this toy example to work. I am getting the following error:
Is this error indicating the compilation was not successful? How to link the lapack library during compilation? In step 1 I use |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
On the one hand, @etsagued, the answer to your question is relatively straightforward. Have a look at FAQ 3.7, which gives instructions on linking C snippets with external libraries. On the other hand, I wonder whether for such a model it is necessary to use simulation-based methods. Given the linear structure of the problem, more efficient approaches are available, no? |
Beta Was this translation helpful? Give feedback.
-
Thank you very much your promptitude! I actually use the FAQ 3.7 to create the toy example above. I will reread it again and try to make it work. Sorry I was not clear in my previous exposition. My model have a linear and nonlinear part. The linear part is a solution to a Sylvester equation which is then combined in a nonlinear with nonadditive shocks to create the full model. That is why, I thought I could use the MIF algorithm. Thanks! |
Beta Was this translation helpful? Give feedback.
-
I finally made to work. As explained in the example FAQ 3.7, I create a directory "include" that contains "sylvester.h" and another one "libs" with "sylvester.so" in it and everything worked beautifully. Thank you again for your help! |
Beta Was this translation helpful? Give feedback.
-
Sure thing! I look forward to hearing about your results! |
Beta Was this translation helpful? Give feedback.
On the one hand, @etsagued, the answer to your question is relatively straightforward. Have a look at FAQ 3.7, which gives instructions on linking C snippets with external libraries.
On the other hand, I wonder whether for such a model it is necessary to use simulation-based methods. Given the linear structure of the problem, more efficient approaches are available, no?