multMixNRMI2 {BNPdensity} | R Documentation |
Multiple chains of MixNRMI2
Description
Multiple chains of MixNRMI2
Usage
multMixNRMI2(
x,
probs = c(0.025, 0.5, 0.975),
Alpha = 1,
Kappa = 0,
Gama = 0.4,
distr.k = "normal",
distr.py0 = "normal",
distr.pz0 = "gamma",
mu.pz0 = 3,
sigma.pz0 = sqrt(10),
delta_S = 4,
kappa = 2,
delta_U = 2,
Meps = 0.01,
Nx = 150,
Nit = 1500,
Pbi = 0.1,
epsilon = NULL,
printtime = TRUE,
extras = TRUE,
adaptive = FALSE,
nchains = 4,
parallel = FALSE,
ncores = parallel::detectCores()
)
Arguments
x |
Numeric vector. Data set to which the density is fitted. |
probs |
Numeric vector. Desired quantiles of the density estimates. |
Alpha |
Numeric constant. Total mass of the centering measure. See details. |
Kappa |
Numeric positive constant. See details. |
Gama |
Numeric constant. |
distr.k |
The distribution name for the kernel. Allowed names are "normal", "gamma", "beta", "double exponential", "lognormal" or their common abbreviations "norm", "exp", or an integer number identifying the mixture kernel: 1 = Normal; 2 = Gamma; 3 = Beta; 4 = Double Exponential; 5 = Lognormal. |
distr.py0 |
The distribution name for the centering measure for locations. Allowed names are "normal", "gamma", "beta", or their common abbreviations "norm", "exp", or an integer number identifying the centering measure for locations: 1 = Normal; 2 = Gamma; 3 = Beta. |
distr.pz0 |
The distribution name for the centering measure for scales. Allowed names are "gamma", or an integer number identifying the centering measure for
scales: 2 = Gamma. For more options use |
mu.pz0 |
Numeric constant. Prior mean of the centering measure for scales. |
sigma.pz0 |
Numeric constant. Prior standard deviation of the centering measure for scales. |
delta_S |
Numeric positive constant. Metropolis-Hastings proposal variation coefficient for sampling the scales. |
kappa |
Numeric positive constant. Metropolis-Hastings proposal variation coefficient for sampling the location parameters. |
delta_U |
Numeric positive constant. Metropolis-Hastings proposal variation coefficient for sampling the latent U. If 'adaptive=TRUE', 'delta_U'is the starting value for the adaptation. |
Meps |
Numeric constant. Relative error of the jump sizes in the continuous component of the process. Smaller values imply larger number of jumps. |
Nx |
Integer constant. Number of grid points for the evaluation of the density estimate. |
Nit |
Integer constant. Number of MCMC iterations. |
Pbi |
Numeric constant. Burn-in period proportion of |
epsilon |
Numeric constant. Extension to the evaluation grid range. See details. |
printtime |
Logical. If TRUE, prints out the execution time. |
extras |
Logical. If TRUE, gives additional objects: means, sigmas, weights and Js. |
adaptive |
Logical. If TRUE, uses an adaptive MCMC strategy to sample the latent U (adaptive delta_U). |
nchains |
The number of chains to run. |
parallel |
Whether to run the chains in parallel. Only works on UNIX-like systems as it rests on Fork parallelism |
ncores |
Number of cores for the parallel run. Defaults to parallel::detectCores(), i.e. the maximum number of cores detected by R on your system. |
Value
a list containing the multiple fits.
See Also
MixNRMI2
, MixNRMI1cens
,
MixNRMI2cens
, multMixNRMI1
Examples
data(acidity)
multMixNRMI2(acidity, parallel = TRUE, Nit = 10, ncores = 2)