_rng in transformed data block

41 views
Skip to first unread message

Krzysztof Sakrejda

unread,
May 12, 2016, 6:11:51 PM5/12/16
to stan development mailing list
I've been writing some scripts for ODSC Boston that simulate data using model parameters or the generated quantities block. The manual says the _rng functions can only be used in generated quantities but it would be nice to simulate some discrete values and then use the model block to simulate from a relevant posterior. I guess for simple models I can pack everything into the generated quantities section but that won't work if I want to simulate from something more complex (e.g.-inhomogeneous poisson process with a smooth intensity function).

The question here is whether this is straightforward but we don't have time for it or whether there's a deeper reason we're not doing it. Sorry for the barrage of simple questions but I've been exercising Stan usage more than usual for this workshop.

Krzysztof

Ben Goodrich

unread,
May 12, 2016, 9:43:13 PM5/12/16
to stan development mailing list

I believe that we agreed this was a good idea and that it was fairly easy to do and haven't done it.

 

Krzysztof Sakrejda

unread,
May 12, 2016, 10:30:09 PM5/12/16
to stan development mailing list

On Thursday, May 12, 2016 at 9:43:13 PM UTC-4, Ben Goodrich wrote:
[snip]
> I believe that we agreed this was a good idea and that it was fairly easy to do and haven't done it.
>
>  

Thanks for looping me in. Seems like a great idea but it's not on my short list either! Krzysztof

Bob Carpenter

unread,
May 13, 2016, 11:55:14 AM5/13/16
to stan...@googlegroups.com
Could somebody remind me what the use case is?
I wasn't sure everyone thought it's a good idea.

One issue is not being able to save the randomization.
Or maybe we add an argument to the interfaces to dump
the transformed parameters?

- Bob
> --
> You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Sebastian Weber

unread,
May 13, 2016, 12:12:58 PM5/13/16
to stan development mailing list
+1 for dumping the transformed parameters optionally. The reason is that I write often many stan functions which rely on data processing in the transformed data block. Currently I have to redo those transformed data steps in R such that I have the right input to the Stan functions.

Sebastian

Bob Carpenter

unread,
May 13, 2016, 3:04:11 PM5/13/16
to stan...@googlegroups.com
That's not at all related to _rng in transformed data. Is
this the right thread? We'll probably be moving to saving only
a subset of the parameters in Stan 3, but we can't seem to
find the time to ever get there.

- Bob

> On May 13, 2016, at 12:12 PM, Sebastian Weber <sdw....@gmail.com> wrote:
>
> +1 for dumping the transformed parameters optionally. The reason is that I write often many stan functions which rely on data processing in the transformed data block. Currently I have to redo those transformed data steps in R such that I have the right input to the Stan functions.
>
> Sebastian
>

Krzysztof Sakrejda

unread,
May 13, 2016, 3:42:21 PM5/13/16
to stan development mailing list
On Friday, May 13, 2016 at 3:04:11 PM UTC-4, Bob Carpenter wrote:
> That's not at all related to _rng in transformed data. Is
> this the right thread? We'll probably be moving to saving only
> a subset of the parameters in Stan 3, but we can't seem to
> find the time to ever get there.

Don't loose hope, it'll happen! K

Reply all
Reply to author
Forward
0 new messages