-
Notifications
You must be signed in to change notification settings - Fork 9
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
BRMS tutorial: add rstan
example
#346
Conversation
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.
Hi Falk
Very nice addition.
I checked the Dutch version. I will assume the same comments apply for the English version.
General remarks:
- Could you keep the term burnin instead of warmup. I like burnin more.
- Any particular reason you provide the poisson_model.stan file in brms_eng folder and not in the brms_nl folder?
- I think I would like to put your section ("Deep Dive: rstan") in a separate section between "Vergelijken met frequentist statistics" and "Referenties". I think the use of rstan is quite advanced for the general users in INBO. Therefore, I think it is better that it is not in the middle of our tutorial, but behind it. People get a view of the whole process of bayesian statistisc (in brms), and if they want (or if they heard about stan somewhere and want to look into it), they can progress further to your section. What do you think?
Het relatieve gebruiksgemak gaat echter ten koste van de flexibiliteit en in zekere mate de leesbaarheid. | ||
|
||
Stan en `rstan` daarentegen leunen meer op de wiskundige formulering van modellen. | ||
Elk aspect van het model moet expliciet worden ingesteld, wat een voordeel kan zijn (bijvoorbeeld als u te maken hebt met niet-standaard use cases) of een nadeel (bijvoorbeeld als u modellen op niet-optionele manieren beveiligt). |
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.
wat bedoel je met "een model beveiligen"?
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.
This was a translation fault of a faulty English sentence, which on top of that I overlooked in proofreading. My apologies! It is corrected.
|
||
Sampling doet vrijwel hetzelfde als hierboven, want in de kern is `brms` gewoon `stan`. | ||
|
||
```{r stan_sampling} |
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.
Ik zou hier ook zelf een burn-in gebruiken zoals we in de brms-voorbeelden hebben gedaan. Dan is het nog meer gelijkaardig als hierboven.
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.
Thank you for pointing this out, @wlangera !
I briefly asked @hansvancalster and googled "burn-in tuning warmup Bayesian stats". There is a to-the-point discussion here. My notion of changing came from the fact that we don't physically "burn" or "burn in" anything; thus I was surprised that apparently the term was considered appropriate for some MCMC algorithms. "Tuning", my actual favorite 🤘, is reserved for a certain sub-part of the warm-up phase (Merci, Hans!).
Anyways, the experts seem to prefer "warm-up", and if you agree and confirm, I will in turn adjust this throughout the tutorial.
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.
Ok that sounds good. Thanks
From looking at the |
Co-authored-by: Ward Langeraert <60934857+wlangera@users.noreply.github.com>
Co-authored-by: Ward Langeraert <60934857+wlangera@users.noreply.github.com>
Co-authored-by: Ward Langeraert <60934857+wlangera@users.noreply.github.com>
Co-authored-by: Ward Langeraert <60934857+wlangera@users.noreply.github.com>
Co-authored-by: Ward Langeraert <60934857+wlangera@users.noreply.github.com>
Thanks, I will try that, and we see where checks lead us. |
Good point; I was thinking about git / data redundancy.
|
I would put it in the base folder of your tutorial: |
I incorporated the change suggestions and re-knitted the html reports. This also yielded two image-related issues, here and here.
Thank you for re-checking and publishing! |
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.
Hi Falk, I have send you the images via mail.
Thanks for the changes
Description
This PR adds an example of
rstan
usage with a raw Stan model to the existingbrms
tutorial.I also rearranged that tutorial a bit (separate section for data).
I was able to test the
Rmd
code, all runs as intended. However, I did not knit or publish any of this to html, the structure and publication procedure of this repo seem too sophisticated for me (though great that it is based on hugo ssg!). I hope it will not crash GHA.Thank you in advance for review and suggestions!
Task list
tutorials/content
index.md
. In case of an Rmarkdown tutorial I have knitted myindex.Rmd
toindex.md
(both files are pushed to the repo).tags
in the YAML header (see the tags listed in the tutorials website side bar for tags that have been used before)categories
to the YAML header and my category tags are from the list of category tagshtml
files, and would appreciate if you original authors and tutorial maintainers could take over.