BNPdensity (version 2019.9.11)

multMixNRMI2cens: Multiple chains of MixNRMI2cens

Description

Multiple chains of MixNRMI2cens

Usage

multMixNRMI2cens(xleft, xright, probs = c(0.025, 0.5, 0.975),
  Alpha = 1, Kappa = 0, Gama = 0.4, distr.k = 1, distr.py0 = 1,
  distr.pz0 = 2, mu.pz0 = 3, sigma.pz0 = sqrt(10), delta = 4,
  kappa = 2, Delta = 2, Meps = 0.01, Nx = 150, Nit = 1500,
  Pbi = 0.1, epsilon = NULL, printtime = TRUE, extras = TRUE,
  nchains = 4, parallel = TRUE, ncores = parallel::detectCores())

Arguments

xleft

Numeric vector. Lower limit of interval censoring. For exact data the same as xright

xright

Numeric vector. Upper limit of interval censoring. For exact data the same as xleft.

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. 0 <= Gama <= 1. See details.

distr.k

Integer number identifying the mixture kernel: 1 = Normal; 2 = Gamma; 3 = Beta; 4 = Double Exponential; 5 = Lognormal.

distr.py0

Integer number identifying the centering measure for locations: 1 = Normal; 2 = Gamma; 3 = Beta.

distr.pz0

Integer number identifying the centering measure for scales: 2 = Gamma. For more options use MixNRMI2cens.

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

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

Numeric positive constant. Metropolis-Hastings proposal variation coefficient for sampling the latent U.

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 Nit.

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.

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

Run this code
# NOT RUN {
data(salinity)
# }
# NOT RUN {
multMixNRMI2cens(salinity$left, salinity$right, parallel = TRUE, Nit = 20, ncores = 2)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace