_lupdf functions - where/how to doc them?

I definitely agree. I was delibelatery holding off working on this for a few months because I knew there would be a doc avalanche triggered by it. And I am kind of responsible for getting this doced, seeing as I added it to stanc3.

We definitely need good examples and docs, otherwise no one will know this exists.

Actually Jonah, can you take a swing at rewriting the user’s guide custom lpdf/lpmf section: https://mc-stan.org/docs/2_24/stan-users-guide/examples.html

I had a look and I think it needs improved. Like, 45 minutes just zoom some stuff out and put a pull in docs so we can discuss.

Like, one problem is the title is “Custom Probability Functions” and it doesn’t really show you all the steps to do a custom probability function. I think it will be easy to tag on the new lupdf/lupmf stuff once we have a foundation but I’m not sure it’s there yet.

@jonah actually I don’t know where people first stumble on _lpdf vs. ~ statements. Maybe we need a new user’s guide section thing altogether.

“Proportionality constants”, and then it can be like @bgoodri said and we can talk about when you need the normalizing terms and when you don’t. Should be pretty short and can give a shoutout to common problems interpreting log densities (target also includes Jacobian terms, etc.)

Yeah I think this is a good point. Especially since this is one of the most common ways that Stan programs differ from each other it could be good to have a separate section for it. Also, the interpretation of sampling statements is one of the more confusing things for new users so that’s also a good reason to give it more/separate attention.

I vote for “Proportionality Constants” and inject it before “Custom Probability Functions”

1 Like