How to incorporate likelihood component in posterior estimation?
3 次查看(过去 30 天)
显示 更早的评论
Hi, I'm new to Matlab and as such I have a very basic question to ask about posterior estimation. In the Bayes Theorem, posterior distribution is proportional to the product of (a) Conditional probability of observing data conditional on parameters (i.e., likelihood function) and (b) Prior distribution of parameters. I understand the Prior part can be dealt with command line like " bayeslm(p,'ModelType','conjugate',..) ". However, I have difficulties how to incorporate likelihood function component. I tried something like " bayeslm(p,'ModelType','conjugate',..)*normpdf(y,mu,sigma) "; however, it didn't work. I appreciate any thoughts. Sorry to address a basic question like this.
0 个评论
回答(1 个)
the cyclist
2023-8-18
I am not experienced using these models, but based on the workflow described in this documentation, I think you just need to use the PriorMdl object (that is the output of bayeslm) as an input to the estimate function (along with the new data), to get the estimated posterior distribution. You don't need to "manually" calculate it via the likelihood function.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!