Dear Statalisters,
I've tried to repeat the example presented by Stata here (https://www.youtube.com/watch?v=0F0QoMCSKJ4) under a very simple data set:
What intrigued me is: whenever I perform these commands
in the command window, it works fine.
I can change the alpha and beta parameters, and it still works perfectly:
However, if I try to use the drop-down menu, exactly as demonstrated by Chuck Huber in the tutorial, I got the message "errors in model specification" whenever clicking on "Create" to define the priors of model parameters.
I'm using Stata 14.1 on Windows 10, and the error message (only under the point-and-click menu) persisted even after I updated the Stata today.
I suspect it might be a bug, probably related to the menu commands.
Thank you in advance for any help!
Kind regards,
Marcos
I've tried to repeat the example presented by Stata here (https://www.youtube.com/watch?v=0F0QoMCSKJ4) under a very simple data set:
Code:
. list +-------+ | heads | |-------| 1. | 0 | 2. | 0 | 3. | 1 | 4. | 0 | 5. | 0 | |-------| 6. | 1 | 7. | 1 | 8. | 0 | 9. | 0 | 10. | 1 | +-------+
What intrigued me is: whenever I perform these commands
Code:
. bayesmh heads, likelihood(dbernoulli({theta})) prior({theta}, beta(1,1))
Code:
Burn-in ... Simulation ... Model summary ------------------------------------------------------------------------------ Likelihood: heads ~ bernoulli({theta}) Prior: {theta} ~ beta(1,1) ------------------------------------------------------------------------------ Bayesian Bernoulli model MCMC iterations = 12,500 Random-walk Metropolis-Hastings sampling Burn-in = 2,500 MCMC sample size = 10,000 Number of obs = 10 Acceptance rate = .4823 Log marginal likelihood = -7.8194591 Efficiency = .2291 ------------------------------------------------------------------------------ | Equal-tailed | Mean Std. Dev. MCSE Median [95% Cred. Interval] -------------+---------------------------------------------------------------- theta | .4187117 .1342192 .002804 .4152274 .1746616 .6876875 ------------------------------------------------------------------------------
Code:
. bayesmh heads, likelihood(dbernoulli({theta})) prior({theta}, beta(30,30)) Burn-in ... Simulation ... Model summary ------------------------------------------------------------------------------ Likelihood: heads ~ bernoulli({theta}) Prior: {theta} ~ beta(30,30) ------------------------------------------------------------------------------ Bayesian Bernoulli model MCMC iterations = 12,500 Random-walk Metropolis-Hastings sampling Burn-in = 2,500 MCMC sample size = 10,000 Number of obs = 10 Acceptance rate = .4245 Log marginal likelihood = -6.9942639 Efficiency = .2376 ------------------------------------------------------------------------------ | Equal-tailed | Mean Std. Dev. MCSE Median [95% Cred. Interval] -------------+---------------------------------------------------------------- theta | .4864921 .0591096 .001213 .4884325 .370204 .6015751 ------------------------------------------------------------------------------
I'm using Stata 14.1 on Windows 10, and the error message (only under the point-and-click menu) persisted even after I updated the Stata today.
I suspect it might be a bug, probably related to the menu commands.
Thank you in advance for any help!
Kind regards,
Marcos
Comment