I am trying to learn Statistical Rethinking by Richard McElreath and am currently at Chapter 8 of the 2015 version of the book. Whilst trying to run R code 8.13, I was unable to run the code and was met with the following message:
Warning in map2stan(alist(log_gdp ~ dnorm(mu, sigma), mu <- a + bR * rugged + :
DEPRECATED: map2stan is no longer supported and may behave unpredictably or stop working altogether. Start using ulam instead.
Hence, I tried replacing map2stan with ulam but I met with this error. So my question is how or what can I do to get rid of this problem? Thank you in advance for your input!


It looks like you have to do further specifications since 2015, as the
alphaobject is no longer a recognized object of the package. Try this instead: