Hi all, Lets say we have a vector of variables a[1…K] following independent normal distribution (e.g. regression coefficients). If these variables have the same mu and sd, one would create a single variable and use the “shape” parameter to pass the K values. (or even create an MvNormal with a spherical covariance)
However, the mu for a variable a[k] depends on the variable a[k-1].
e.g. a[k] ~ N(a[k-1],tau).
An additional complication is that these variables follow a truncated distribution in which the lower bound for a[k] is determined by a[k-1].
e.g. a[k] = Bound(Normal, lower=a[k-1])('a_k',mu=a[k-1],sd=tau)
Is my only option to create these variables explicitly in a for loop? (which I presume will slow down inference considerably).
The worse part is that it is used as part of a hierarchical model, so i will end up having to replicate the structure!
Thanks in advance for your suggestions.