Open Lxr-China opened 3 weeks ago
Hello, I intend to construct a nonlinear state space model using the BSSM package. N represents the number of economies, with the state vector having 11N dimensions and the observable vector having 2N dimensions. I have written C++ functions for Z, T, H, R, etc., based on the vignette template. However, the model encounters errors during the final runtime, as depicted in the figure. What should I do next? Thank you for your assistance.
ssm.zip My CPP document and R script are both included in this compressed file.
It sounds like one of your C++ functions tries to modify the size of the model matrices. Maybe try calling those C++ functions like H_fn
separately from R with properly sized inputs and see which one causes the error, and then debug inside the function by adding some Rcout
calls to spot the exact line.
Thank you very much for your reply, which has provided me with insights into solving the problem. I wish you success in your work and happiness in your life.