PyStan: how to sample priors?

Hi there,

Very noob question here:

What’s the recommendation for sampling from priors?

  1. manually do it outside of pystan? [that’s what I’ve done so far]
  2. use generated quantities in the model code?
  3. somehow there’s a function call in pystan I’ve missed?

Otherwise, it’s working great.

Thank you!

  • Operating System windows 10 WSL ubuntu
  • Python Version py 3.8
  • PyStan Version 3.0.2
  • Compiler/Toolkit ?
1 Like

Oh, I’ll attempt to answer my own question.
I just saw this in the rstan side…
This post: Prior predictive checks: general implementation and truncated parameters


I think the answers in this topic will help: Sampling from prior distributions of a hierarchical model