mcmc_pol | R Documentation |
mcmc_pol
returns the samples from the posterior of alpha and theta, for fitting the Zipf-polylog distribution to the data x. The samples are obtained using Markov chain Monte Carlo (MCMC). In the MCMC, a Metropolis-Hastings algorithm is used.
mcmc_pol(
x,
count,
alpha,
theta,
a_alpha,
b_alpha,
a_theta,
b_theta,
a_pseudo,
b_pseudo,
pr_power,
iter,
thin,
burn,
freq,
invt,
mc3_or_marg,
x_max
)
x |
Vector of the unique values (positive integers) of the data |
count |
Vector of the same length as x that contains the counts of each unique value in the full data, which is essentially rep(x, count) |
alpha |
Real number greater than 1, initial value of the parameter |
theta |
Real number in (0, 1], initial value of the parameter |
a_alpha |
Real number, mean of the prior normal distribution for alpha |
b_alpha |
Positive real number, standard deviation of the prior normal distribution for alpha |
a_theta |
Positive real number, first parameter of the prior beta distribution for theta; ignored if pr_power = 1.0 |
b_theta |
Positive real number, second parameter of the prior beta distribution for theta; ignored if pr_power = 1.0 |
a_pseudo |
Positive real number, first parameter of the pseudoprior beta distribution for theta in model selection; ignored if pr_power = 1.0 |
b_pseudo |
Positive real number, second parameter of the pseudoprior beta distribution for theta in model selection; ignored if pr_power = 1.0 |
pr_power |
Real number in [0, 1], prior probability of the discrete power law |
iter |
Positive integer representing the length of the MCMC output |
thin |
Positive integer representing the thinning in the MCMC |
burn |
Non-negative integer representing the burn-in of the MCMC |
freq |
Positive integer representing the frequency of the sampled values being printed |
invt |
Vector of the inverse temperatures for Metropolis-coupled MCMC |
mc3_or_marg |
Boolean, is invt for parallel tempering / Metropolis-coupled MCMC (TRUE, default) or marginal likelihood via power posterior (FALSE)? |
x_max |
Scalar, positive integer limit for computing the normalising constant |
A list: $pars is a data frame of iter rows of the MCMC samples, $fitted is a data frame of length(x) rows with the fitted values, amongst other quantities related to the MCMC
mcmc_mix2
and mcmc_mix3
for MCMC for the 2-component and 3-component discrete extreme value mixture distributions, respectively.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.