obtain_u_set_mix1 computes the profile posterior density of the threshold u, and subsets the thresholds (and other parameter values) with high profile values i.e. within a certain value from the maximum posterior density. The set of u can then be used for mcmc_mix1.
obtain_u_set_mix1(
df,
positive = FALSE,
u_max = 2000L,
log_diff_max = 11,
alpha1_init = 0.01,
theta1_init = exp(-1),
alpha2_init = 2,
a_psiu = 0.1,
b_psiu = 0.9,
m_alpha1 = 0,
s_alpha1 = 10,
a_theta1 = 1,
b_theta1 = 1,
m_alpha2 = 0,
s_alpha2 = 10,
x_max = 1e+05
)A list: u_set is the vector of thresholds with high posterior density, init is the data frame with the maximum profile posterior density and associated parameter values, profile is the data frame with all thresholds with high posterior density and associated parameter values, scalars is the data frame with all arguments (except df)
A data frame with at least two columns, x & count
Boolean, is alpha1 positive (TRUE) or unbounded (FALSE, default)?
Positive integer for the maximum threshold
Positive real number, the value such that thresholds with profile posterior density not less than the maximum posterior density - log_diff_max will be kept
Scalar, initial value of alpha1
Scalar, initial value of theta1
Scalar, initial value of alpha2
Scalars, hyperparameters of the priors for the parameters
Scalar (default 100000), positive integer limit for computing the normalising constant
mcmc_mix1_wrapper that wraps obtain_u_set_mix1 and mcmc_mix1, obtain_u_set_mix2 for the equivalent function for the 2-component mixture model