matrix exponentials in nimbleFunction

18 views
Skip to first unread message

Henry Scharf

unread,
Jun 3, 2021, 1:17:13 AM6/3/21
to nimble-users
Hello nimble users and developers,

Thanks very much for all your hard work building and maintaining nimble. I'm working with a model involving a multivariate Ornstein-Uhlenbeck process, and I'd like to write a nimbleFunction to do the log likelihood calculation based on a Kalman Filter. To that end, I need to compute matrix exponentials.

Any advice for matrix exponentials with nimble? My plan is to use nimbleRcall to allow me to use the expm R package, but I thought I'd ask first to see if there's a better way.

Thanks,
Henry

Chris Paciorek

unread,
Jun 4, 2021, 8:17:32 PM6/4/21
to Henry Scharf, nimble-users
Hi Henry,

Trying nimbleRcall seems like a good first step. That should at least allow you to prototype. If the overhead of calling back to R is not too much relative to the other computations, that may be all you need. If the overhead is an issue, you might also explore using nimbleExternalCall to directly call out to the C code that underlies the expm calculations for the method you choose to use.

-chris

--
You received this message because you are subscribed to the Google Groups "nimble-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nimble-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/cf0106be-0a29-4234-a01f-4f245b3eaeaen%40googlegroups.com.

Henry Scharf

unread,
Jun 4, 2021, 8:47:49 PM6/4/21
to nimble-users
Thanks!
Reply all
Reply to author
Forward
0 new messages