Hi all,
One of the strengths of bayesmh is the possibility of going beyond Stata’s built-in models.
However, I am struggling using the command bayespredict after one uses bayesmh using a user-specified Log-likelihood evaluator.
A nice example of the limitation can be shown after the bayesian estimation of a hurdle model, developed by Yulia Marchenko and Nikolay Balov:
https://blog.stata.com/2015/05/26/ba...uilt-in-models
I was trying to go one step further, using this example.
after constructing a log-likelihood evaluator (mychurdle2) the authors show that the hurdle model can be easily estimate using the following command:
bayesmh (hours age) (hours0 commPosts 3 ute), llevaluator(mychurdle2, parameters({lnsig})) prior({hours:} {hours0:} {lnsig}, flat) saving(sim, replace) dots
However, If one tries to construct predictions, using the command
bayespredict {_ysim1} {_ysim2} if hours0==1, saving(reps) rseed(123)
I get the following error
"predictions not available with mychurdle2 likelihood option"
Does this means that predictions are not possible when one gowes beyound Stata’s built-in models?
Or... there is a way to change the evaluator to achieve this?
Any help is greatly appreciated.
best
Javier
One of the strengths of bayesmh is the possibility of going beyond Stata’s built-in models.
However, I am struggling using the command bayespredict after one uses bayesmh using a user-specified Log-likelihood evaluator.
A nice example of the limitation can be shown after the bayesian estimation of a hurdle model, developed by Yulia Marchenko and Nikolay Balov:
https://blog.stata.com/2015/05/26/ba...uilt-in-models
I was trying to go one step further, using this example.
after constructing a log-likelihood evaluator (mychurdle2) the authors show that the hurdle model can be easily estimate using the following command:
bayesmh (hours age) (hours0 commPosts 3 ute), llevaluator(mychurdle2, parameters({lnsig})) prior({hours:} {hours0:} {lnsig}, flat) saving(sim, replace) dots
However, If one tries to construct predictions, using the command
bayespredict {_ysim1} {_ysim2} if hours0==1, saving(reps) rseed(123)
I get the following error
"predictions not available with mychurdle2 likelihood option"
Does this means that predictions are not possible when one gowes beyound Stata’s built-in models?
Or... there is a way to change the evaluator to achieve this?
Any help is greatly appreciated.
best
Javier
