We could do Waic in rstan as is (just using the function I already wrote!), conditional on the user creating the log_lik vector correctly in the Stan program. But maybe it makes sense to get it working in regular Stan using tagging. That sort of user intervention (tagging lines in the model as components in the loglik vector) would be necessary in any case. There's no way that it could be done automatically given only the log posterior function with no labeling.
I do think, however, that we should be able to do it without setting up intermediate log probability variables. I think it should be possible (at least for many many common examples) to just have the user tag the appropriate lines in the model as being log-likleihood terms.
A
On Dec 28, 2013, at 10:59 PM, Bob Carpenter wrote:
>
>
> On 12/28/13, 4:49 PM, Shige Song wrote:
>> Will be great if it can be incorporated into the rstan package.
>
> It'll have to be changed in basic Stan first so that
> there's a way to specify the log probabilities in the algorithm.
>
> As Andrew brought up, it's a bit tricky now because of the interpretation
> of up-to-a-proportion calcs. One thing I could do is template out the
> propto template parameter for both the sampling statements and
> log probability functions and let that be specified at compile time.
> But there's still the issue of how to divide the data up and specify the
> model. It won't be something we can do without user intervention in
> setting up all the intermediate log probability variables needed.
>
> - Bob
>
> --
> You received this message because you are subscribed to the Google Groups "stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
stan-users+...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.