obtain_u_set_mix2_constrained
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_mix2
. Power law is assumed for the body, and alpha is assumed to be greater than 1.0 and smaller than 1.0/shape+1.0
obtain_u_set_mix2_constrained(
df,
u_max = 2000L,
log_diff_max = 11,
alpha_init = 2,
shape_init = 0.1,
sigma_init = 1,
a_psiu = 0.001,
b_psiu = 0.9,
m_alpha = 0,
s_alpha = 10,
a_theta = 1,
b_theta = 1,
m_shape = 0,
s_shape = 10,
a_sigma = 1,
b_sigma = 0.01
)
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
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 alpha
Scalar, initial value of shape parameter
Scalar, initial value of sigma
Scalars, hyperparameters of the priors for the parameters
obtain_u_set_mix2
for the unconstrained version