Richard Asturia <richard.asturia <at> gmail.com> writes: > > Hi! > > I am trying to calculate HPD for the coeficients of regression models > fitted with lm or lmrob in R, pretty much in the same way that can be > accomplished by the association of mcmcsamp and HPDinterval functions for > multilevel models fitted with lmer. Can anyone point me in the right > direction on which packages/how to implement this? > > Thanks for your time! > > R. >
Hmmm. At least for lm(), if the assumptions of the model are met then the sampling distribution of the parameters should be multivariate normal, so with a flat prior the posterior distributions should be symmetric and equivalent to the sampling distributions of the parameters -- so I think that the highest 95% posterior density interval should be equivalent to classical frequentist confidence intervals [see confint()]. You might be interested in the bayeslm() function from the arm package. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.