get_posterior_HPDinterval: Calculates Highest Posteriod Density intervals of a function...

View source: R/MegaLMM_functions.R

get_posterior_HPDintervalR Documentation

Calculates Highest Posteriod Density intervals of a function of parameters

Description

The synthetic parameter can be pre-calculated using get_posterior_FUN, or provided directly as an array with the first dimension the samples.#'

Usage

get_posterior_HPDinterval(X, FUN = NULL, prob = 0.95, ...)

Arguments

X

either an array of posterior samples (either a parameter from Posterior, or an object generated by get_posterior_FUN), or the MegaLMM_state object with re-loaded Posterior

FUN

(optional) if X is a MegaLMM_state object, the function to calculate the synthetic parameter

prob

A numeric scalar in the interval (0,1) giving the target probability content of the intervals. The nominal probability content of the intervals is the multiple of 1/nrow(obj) nearest to prob

...

other parameters passed to get_posterior_FUN

Value

array with first dimension of length=2 giving the lower and upper limits of the parameters in the other two dimensions.


deruncie/MegaLMM documentation built on June 10, 2025, 7:26 p.m.