parallel_fusion_SMC_BLR | R Documentation |
Generalised Monte Carlo Fusion for Bayesian Logistic Regression
parallel_fusion_SMC_BLR( particles_to_fuse, N, m, time, dim, data_split, prior_means, prior_variances, C, precondition_matrices, resampling_method = "multi", ESS_threshold = 0.5, cv_location = "hypercube_centre", diffusion_estimator = "Poisson", beta_NB = 10, gamma_NB_n_points = 2, local_bounds = TRUE, seed = NULL, n_cores = parallel::detectCores(), cl = NULL, level = 1, node = 1, print_progress_iters = 1000 )
particles_to_fuse |
list of length m, where particles_to_fuse[c] contains the particles for the c-th sub-posterior. Can initialise a this from list of sub-posterior samples by using the initialise_particle_sets function |
N |
number of samples |
m |
number of sub-posteriors to combine |
time |
time T for fusion algorithm |
dim |
dimension of the predictors (= p+1) |
data_split |
list of length m where each item is a list of length 4 where for c=1,...,m, data_split[[c]]$y is the vector for y responses and data_split[[c]]$X is the design matrix for the covariates for sub-posterior c, data_split[[c]]$full_data_count is the unique rows of the full data set with their counts and data_split[[c]]$design_count is the unique rows of the design matrix and their counts |
prior_means |
prior for means of predictors |
prior_variances |
prior for variances of predictors |
C |
overall number of sub-posteriors |
precondition_matrices |
list of length m, where precondition_matrices[[c]] is the precondition matrix for sub-posterior c |
resampling_method |
method to be used in resampling, default is multinomial resampling ('multi'). Other choices are stratified resampling ('strat'), systematic resampling ('system'), residual resampling ('resid') |
ESS_threshold |
number between 0 and 1 defining the proportion of the number of samples that ESS needs to be lower than for resampling (i.e. resampling is carried out only when ESS < N*ESS_threshold) |
cv_location |
string to determine what the location of the control variate should be. Must be either 'mode' where the MLE estimator will be used or 'hypercube_centre' (default) to use the centre of the simulated hypercube |
diffusion_estimator |
choice of unbiased estimator for the Exact Algorithm between "Poisson" (default) for Poisson estimator and "NB" for Negative Binomial estimator |
beta_NB |
beta parameter for Negative Binomial estimator (default 10) |
gamma_NB_n_points |
number of points used in the trapezoidal estimation of the integral found in the mean of the negative binomial estimator (default is 2) |
local_bounds |
logical value indicating if local bounds for the phi function are used (default is TRUE) |
seed |
seed number - default is NULL, meaning there is no seed |
n_cores |
number of cores to use |
cl |
an object of class "cluster" for parallel computation in R. If none is passed, then one is created and used within this function |
level |
indicates which level this is for the hierarchy (default 1) |
node |
indicates which node this is for the hierarchy (default 1) |
print_progress_iters |
number of iterations between each progress update (default is 1000). If NULL, progress will only be updated when importance sampling is finished |
A list with components:
particles returned from fusion sampler
proposal samples from fusion sampler
run-time of fusion sampler
effective sample size of the particles after each step
conditional effective sample size of the particles after each step
boolean value to indicate if particles were resampled after each time step
list of length 2 where precondition_matrices[[2]] are the pre-conditioning matrices that were used and precondition_matrices[[1]] are the combined precondition matrices
combined data for the fusion density
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.