There are two versions of the gaussian_dlm_obs distribution: one has a full covariance matrix for the observation errors, and the other one takes a diagonal covariance matrix, as a vector. I am puzzled by the fact that they don’t do the same checks on their arguments. For example, the diagonal-covariance-matrix version does check_not_nan() on the arguments, but the full-covariance-matrix version does not. Does anyone know if these differences are intentional, or are they just historical accidents?

Some of the checks were removed in https://github.com/stan-dev/math/pull/1467. For example, there’s no need to have an explicit call to `check_not_nan`

on a matrix if there’s already a `check_pos_definite`

, because the latter already includes it.

2 Likes