Dear A. Rambaut and A. Drummond,
Thks so much for the replies, guys! It helped me figure out 2 solutions, one more heuristic, the other using an R script (thks Andrew for the suggestion on using R for this task!)... But first, I just want to clarify that my question was motivated by the difference on what's reported in the intended prior (reported in Beauti's prior tab using quantiles) and the effective prior as observed in Tracer (which uses the highest 95% density interval). The issue is that, e.g., if I intend to set a lognormal within the 95% density interval, it is not feasible to set it properly in beauti, because depending on the skewness of the distribution, the effective prior's 95% density (as seen in Tracer) can be more towards the lowest 95% interval of the intended prior in beauti (if very skewed), or more towards the 2.5% - 97.5% interval of the intended prior (if closer to a Normal).
As this may be of general interest to Beast users because lognormal distributions are heavily used as priors on both rates and dates, after playing with some values of the log(stdev) parameter (which determines the skewness level), I found out that a general rule of thumb is that if the intended prior of a Lognormal in Beast is "very skewed" (stdev >= 0.7), then Beauti's lowest 95% interval is very close to the 95% HPD reported in Beast; contrarily, if the logN distribution is closer to a Normal (stdev <= 0.3), then it's safe to assume the central 2.5% - 97.5% interval (i.e., Tracer will report a 95% HPD close to that range). Regarding the Exponential distribution (also used a lot for priors), the lowest 95% of the intended prior is always the closest match. It's important to mention once again that these results concern what range one should focus on when setting up Beauti priors, regarded that Tracer reports the 95% HPD.
Now, because the heuristic solution above (in terms of stdev values) can only be applied to the lognormal, an analog reasoning makes it extensible to other distributions, although I haven't tried others. Following Andrew Rambaut's suggestion, I found in R the "TeachingDemos" package, which has the hpd function. Below, I post an example code on how to calculate exactly the 95% HPD bounds of a LogN intended prior... it's a simple solution, as the bounds must be found by trial-and-error, by changing mean and stdev values:
# Load package "TeachingDemos", which has the "hpd" function
library(TeachingDemos)
my_mean = put_your_value_here
stdev = some_other_value
# Calculate lower and upper 95% density of the intended lognormal prior
# if mean is given in REAL space:
real_mean_HPD <- hpd(qlnorm, meanlog=log(my_mean)-stdev^2/2, sdlog=stdev)
print(real_mean_HPD)
# if mean is given in LOG space:
log_mean_HPD <- hpd(qlnorm, meanlog=my_mean, sdlog=stdev)
print(log_mean_HPD)
Other distributions can be used, this was just a LogN example.
All the best,
Jose.