Build a Lagrange polynomial interpolant of the marginal posterior, for plotting and for computing quantiles.
interpolate_marginal_posterior(
margpost,
method = c("auto", "polynomial", "spline")
)
A function of theta
which computes the log interpolated normalized marginal posterior.
The output of aghq::marginal_posterior
. See the documentation for that function.
The method to use. Default is a k
point polynomial interpolant using polynom::poly.calc()
.
This has been observed to result in unstable behaviour for larger numbers of quadrature points k
,
which is of course undesirable. If k > 3
, you can set method = 'spline'
to use splines::interpSpline()
instead,
which uses cubic B-Splines. These should always be better than a straight polynomial, except don't work
when k < 4
which is why they aren't the default. If you try and set method = 'spline'
with
k < 4
it will be changed back to polynomial, with a warning.
Other summaries:
compute_pdf_and_cdf()
,
compute_quantiles()
,
marginal_posterior()