> On Apr 26, 2017, at 9:47 PM, Fred Wu <
jianyun...@gmail.com> wrote:
>
> Thanks for the reply Bob.
>
> I am actually working on a state-space model using FFBS and Simulation Smoothing algorithm via Kalman Filter.
> There are some problems by using inverse-gamma prior for the variance parameters. Therefore, I would like to try the cauchy prior.
That's easy in Stan. We've been moving toward things like (half) normal
priors when we don't need the fat tails, or sometimes just using Student-t
with 4 degrees of freedom to get something in between.
> I have written them as user-defined functions.
>
> My further question is:
> Can I embedded them in the Stan code, which defined the prior of variance parameters in Stan but generating the posterior sample of state process via other algorithm?
I can't quite follow what you want to do with what here. Stan
functions are always embedded in Stan code in some snese. In R,
you can expose the Stan functions and use them for whatever you want.
- Bob