FindPosteriorMeanRate {carbondate} | R Documentation |
Given output from the Poisson process fitting function PPcalibrate calculate
the posterior mean rate of sample occurrence (i.e., the underlying Poisson process
rate \lambda(t)
) together with specified probability intervals, on a given calendar age
grid (provided in cal yr BP).
Note: If you want to calculate and plot the result, use PlotPosteriorMeanRate instead.
For more information read the vignette:
vignette("Poisson-process-modelling", package = "carbondate")
FindPosteriorMeanRate(
output_data,
calendar_age_sequence,
n_posterior_samples = 5000,
interval_width = "2sigma",
bespoke_probability = NA,
n_burn = NA,
n_end = NA
)
output_data |
The return value from the updating function
PPcalibrate. Optionally, the output data can have an extra list item
named |
calendar_age_sequence |
A vector containing the calendar age grid (in cal yr BP) on which to calculate the posterior mean rate. |
n_posterior_samples |
Number of samples it will draw, after having removed |
interval_width |
The confidence intervals to show for both the
calibration curve and the predictive density. Choose from one of |
bespoke_probability |
The probability to use for the confidence interval
if |
n_burn |
The number of MCMC iterations that should be discarded as burn-in (i.e.,
considered to be occurring before the MCMC has converged). This relates to the number
of iterations ( |
n_end |
The last iteration in the original MCMC chain to use in the calculations. Assumed to be the
total number of iterations performed, i.e. |
A list, each item containing a data frame of the calendar_age_BP
, the rate_mean
and the confidence intervals for the rate - rate_ci_lower
and rate_ci_upper
.
# NOTE: All these examples are shown with a small n_iter and n_posterior_samples
# to speed up execution.
# Try n_iter and n_posterior_samples as the function defaults.
pp_output <- PPcalibrate(
pp_uniform_phase$c14_age,
pp_uniform_phase$c14_sig,
intcal20,
n_iter = 1000,
show_progress = FALSE)
# Default plot with 2 sigma interval
FindPosteriorMeanRate(pp_output, seq(450, 640, length=10), n_posterior_samples = 100)