How to code up a model with discrete parameters in Stan

Sdílet
Vložit
  • čas přidán 10. 09. 2024
  • This video explains how to use Stan to sample from a model with discrete parameters.
    This video is part of a lecture course which closely follows the material covered in the book, "A Student's Guide to Bayesian Statistics", published by Sage, which is available to order on Amazon here: www.amazon.co....
    For more information on all things Bayesian, have a look at: ben-lambert.co.... The playlist for the lecture course is here: • A Student's Guide to B...

Komentáře • 8

  • @_psyguy
    @_psyguy Před 5 měsíci

    God bless you! The explanation of marginalization in the Stan documentations was quite confusing and this video made it understandable for me. Thanks!

  • @xudongzhang9234
    @xudongzhang9234 Před 5 lety +2

    Hi, Ben, God bless you for your amazing video, and CZcams for recommending this video to me.
    Clear explanations with hands-on R examples!

  • @xudongzhang9234
    @xudongzhang9234 Před 5 lety +3

    Hi, Ben, In 9:42 , since log( p(n) ) = 0.25, we also can remove it, right?
    Of course this is only true if n has discrete uniform distribution.

  • @cornagojar
    @cornagojar Před 5 lety +1

    thank you very informative

  • @gangwang1658
    @gangwang1658 Před 2 lety

    Please correct me if I am wrong.
    I am not sure we need the last line in the model block: theta ~ uniform(0,1) in principle. Though in the case of uniform theta, it does not matter here, but if theta is non-uniform distribution, we shall not have this line as log_sum_exp(lq) includes all terms.

  • @gangwang1658
    @gangwang1658 Před 2 lety

    Remove log(p(theta)) is correct but the reason is not that theta is not term being summed as mentioned in the video but because theta is uniform distribution.

  • @perefusterescriva1510
    @perefusterescriva1510 Před 5 lety

    Hi teacher. You do not believe how useful it’s been to me. Still waiting for a course on matlab, eviews or another software to undertake econometric analysis. Also interested in non parametric regression if it is not too much asking. If that is posible you would have literally saved my life. Thanks anyway.

  • @kriss2u
    @kriss2u Před 5 lety

    I'm sorry to ask but may I know which application is getting used to create this beautiful video ?