I have been trying to simulate a quadratic yield curve model and estimate the state variable using a UKF, but after some iterations (usually two) the covariance matrix is not positiv definite anymore, so the cholesky decomposition fails. As an alternative I found the square root UKF from Van der Merwe and Wan (2000), which uses QR decomposition and chosleky factor updating. This is why I wanted to ask if there is an implementation of this algorithm in R? I couldn’t find one yet. Thank you.