kaskr / RTMB

R bindings to TMB
Other
48 stars 6 forks source link

Guidance on cholesky decomposition #29

Closed Cole-Monnahan-NOAA closed 2 months ago

Cole-Monnahan-NOAA commented 3 months ago

I'm trying to recreate a model from Stan that uses a quadratic exponential covariance form for a spatial model (Stan code here). Once the covariance matrix is built they take the cholesky decomposition of it.

When I try this in RTMB it complains about the matrix being complex. I know it's not but presume this is because RTMB uses complex numbers on the backend. Is there an easy way around this, or an alternative approach?

kaskr commented 2 months ago

chol is now added to RTMB