mcmc_mix
returns the samples from the joint posterior of the parameters (u, xi1, xi2, sig), for fitting the discrete extreme value mixture distribution (DEVMD) to the data x. The samples are obtained using Markov chain Monte Carlo (MCMC).
mcmc_mix(
x,
u,
xi1,
xi2,
sig,
geo,
cont,
a_phi,
b_phi,
a_xi1,
b_xi1,
m_xi2,
s_xi2,
a_sig,
b_sig,
pcont,
N = 20000L,
thin = 100L,
burnin = 20000L,
print_freq = 10000L
)
A data frame containing N rows and 7 columns which represent (in this order) the 4 parameters (u, xi1, xi2, sig), the implied exceedance probability (phi), the log-posterior density (lpost), and whether the continuity constraint is imposed (cont).
Vector of positive integers, representing the data
Scalar, initial value of the positive integer threshold
Scalar, initial value of the parameter for values below or equal to u
Scalar, initial value of the shape parameter of the integer generalised Pareto distribution (IGPD), for values above u
Scalar, initial value of the scale parameter of IGPD, for values above u
Boolean. If 'TRUE', the geometric distribution is used for the values below u. If 'FALSE', the discrete power law is used.
Boolean, whether the continuity constraint is imposed at u
Scalars, representing the hyperparameters of the prior distributions of the respective parameters. See details for the specification of the priors.
Scalar, between 0.0 and 1.0, representing the prior probability of the continuity constrained version, for model selection.
Scalar, positive integer representing the length of the output chain i.e. the number of rows in the returned data frame
Scalar, positive integer representing the thinning in the MCMC
Scalar, non-negative integer representing the burn-in of the MCMC
Scalar, positive integer representing the frequency of printing the sampled values
In the MCMC, a componentwise Metropolis-Hastings algorithm is used. Unlike mcmc_upp
, the threshold u is treated as a parameter in mcmc_mix
and therefore inferred. The 8 hyperparameters are used in the following priors: u is such that the implied exceedance probability phi ~ Uniform(a_phi, b_phi); xi1 ~ Uniform(a_xi1, b_xi1); xi2 ~ Normal(mean = m_xi2, sd = s_xi2); sig ~ Gamma(shape = a_sig, rate = b_sig). If pcont = 0.0, only the unconstrained version of the DEVMD is fitted; if pcont = 1.0, only the continuity constrained version is fitted. Setting pcont between 0.0 and 1.0 allows both versions to be fitted, if model selection between the two is of interest.
mcmc_upp
for MCMC for the discrete power law.