Thanks a lot for your reply! That is interesting function. And you are completely right. Of course it may be an overkill to use hpd with lm... But anyway, I am precisely interested in comparing CI and HPD for a model fitted with lm and then do the same comparison for the same model fitted with lmrob. I played a little bit with the bayeslm() you've suggested and I think it pretty much solves my issue for lm. But what about doing something similar to lmrob? In this case, as far as I know, there is no similar function. If this is right, some "manual" solution should be needed, i.e. some code-implementation using MCMC.
Any ideas on which funcionts/code could help me doing so for lmrob fitted objects? Thanks again! R. 2013/5/8 Ben Bolker <bbol...@gmail.com> > 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. > [[alternative HTML version deleted]] ______________________________________________ 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.