Hello everyone,

I'm trying to replicate a simple example of Bayesian Analysis as in the Federal Fund Rate example on page 47-51 in this file https://www.stata.com/meeting/chicago16/slides/chicago16_balov.pdf

Code:
use http://www.stata-press.com/data/r15/usmacro

mswitch dr fedfunds

generate id=_n

help fvset

fvset base none id

set seed 12345

bayesmh fedfunds = (({state:}==1)*{mu1}+({state:}==2)*{mu2}), ///
likelihood(normal({sig2})) redefine(state:i.id) ///
prior({state:}, index({p1}, (1-{p1}))) ///
prior({p1}, uniform(0, 1)) ///
prior({mu1} {mu2}, normal(0, 100)) ///
prior({sig2}, igamma(0.1, 0.1)) ///
init({p1} 0.5 {mu1} 1 {mu2} 1 {sig2} 1 {state:} 1) ///
block({sig2}, gibbs) block({p1}) block({mu1}{mu2}) ///
exclude({state:}) dots
However, even though I copied and and pasted the whole code in the example it keeps returning this error
Code:
"bayesmh fedfunds = (({state:}==1)*{mu1}+({state:}==2)*{mu2}), ///
invalid bayesmh specification
To fit one of the supported models, you must specify a likelihood model in option likelihood() and a prior distribution in option prior(). To fit your own model, you must specify, for example, the name of your posterior-function evaluator in option evaluator(). See bayesmh and bayesmh evaluators for details. r(198);"
I just want to replicate this example, so that I can apply it for my other analysis. Any help on how to replicate the example would be very appreciated!

Many thanks.