stan-dev / example-models

Example models for Stan
http://mc-stan.org/
766 stars 478 forks source link

update case study of hierarchical models for binary trials #214

Open mitzimorris opened 2 years ago

mitzimorris commented 2 years ago

Updated models and notebook for Stan case study "Hierarchical Partial Pooling for Repeated Binary Trials"

mitzimorris commented 2 years ago

This PR updates the Rmd notebook and the HTML A subsequent PR will break this case study into multiple parts and create Jupyter notebooks.

WardBrian commented 2 years ago

To actually update the one people see I think there needs to be a separate PR to https://github.com/stan-dev/stan-dev.github.io, right?

I’ll take a look at this tomorrow

mitzimorris commented 2 years ago

If you OK this PR, that should be sufficient review for the stan-dev.github.io pages as well.

mitzimorris commented 2 years ago

can we turn off compilation for the include fragments? if so, how?

WardBrian commented 2 years ago

I think @rok-cesnovar put it together. My guess is provably naming them something other than .stan would work, but then you lose syntax highlighting etc

mitzimorris commented 2 years ago

@rok-cesnovar - the include files are in a directory named "include" - can we do something with this information? for this case study, using includes makes a lot of sense. also, it's good to have more examples of how this works somewhere.

rok-cesnovar commented 2 years ago

Feel free to ignore the testing errors, will fix the GHA script later this week to ignore the files you mentioned.

WardBrian commented 2 years ago

It doesn't let me comment directly on the rendered HTML, but here are some thoughts on the way the output looks:

mitzimorris commented 2 years ago

Can we hide the 'A newer version of CmdStan is available. See ?install_cmdstan() to install it.' message? If possible it would also be great to hide some (if not all) of these setup messages such as the cmdstan path

I think this is an CmdStanR bug. I actually have CmdStan 2.28.2 installed. I also have a version of develop in my .cmdstan directory and I named that dir cmdstan-develop - CmdStanPy ignores it, but CmdStanR wanted to use that and not 2.28.2. @rok-cesnovar - what are the rules for CmdStanR?

WardBrian commented 2 years ago

It mentions an environment variable to disable it for now

mitzimorris commented 2 years ago

I just converted it to a draft because there's more work to be done here.

will investigate formatting issues.

it would definitely be nice to get Stan syntax highlighting into the HTML and I'm pretty sure we can hack the .Rmd to make that happen.

WardBrian commented 2 years ago

What program is used to ultimately create the HTML? Pandoc?

rok-cesnovar commented 2 years ago

@rok-cesnovar - what are the rules for CmdStanR?

We sort the folder in .cmdstan, not sure why -develop would be ahead though. Will check.