-
-
Notifications
You must be signed in to change notification settings - Fork 478
sum_to_zero_vector case study #229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
hi @spinkney and @WardBrian - not sure if we need reviews to add case studies, but I would appreciate any feedback you might have, if you have time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only have one real comment, otherwise this looks great!
Will you also open a PR to add the rendered version to the website?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mostly added comments that hopefully helps the reader to see the differences and the results more clearly. I'm happy that you put this together and I'm happy to chat about any of the comments if you'd like.
``` | ||
|
||
**Eth** | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this? What does all the code do? Don't assume your readers know python that well!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spinkney: What are you asking for here? Documentation within the code? A description summarizing what it does on the outside?
I would assume the readers know Python pretty well. Otherwise, the intro to Python will overwhelm the intro to sum-to-zero. If you do want to teach people bits of Python, you should have a model reader in mind or it will be very hard to decide where to stop with expounding on the Python code. Is that someone who knows Python syntax but not any libraries like numpy or matplotlib? Or someone even less skilled who doesn't understand python scoping or control flow? Maybe they don't know what +=
means or that range(N)
is from 0 to N-1
?
rewrote the case study per @spinkney comments - which were absolutely spot on!
should I omit the ipynb or update to match? |
This is basically saying that your model fails SBC as specified. One way to fix it would be to (a) tighten the priors so they're not so extreme, and (b) avoid simulating empty strata by generating the fill level uniformly in (0.5, 1) rather than uniformly in (0, 1). That would probably be preferable than a disclaimer that says SBC fails. I wouldn't say "data-generating parameters"---the parameters are arguments to the distributions that generate data, but they don't generate data themselves. I would also prefer "zero count" to "no count". I would also prefer "varying effects" to "random effects" for all the reasons Andrew mentions. How about:
|
@spinkney, @bob-carpenter - ready for review |
Transferring the contents of github repo: https://github.com/mitzimorris/sum_to_zero_vector to this repo.
This case study introduces the
sum_to_zero_vector
. It demonstrates a simple workflow for evaluating performance of different ways to impose a sum-to-zero constraint on a parameter vector.The HTML file is self-contained. To re-render the HTML, this requires the
stan-dev/quarto-config
repo for the Stan website styling.