par_fusion_RIS_TA_BLR: Parallel Time-adapting Rejection-Importance Sampling Monte...

Description Usage Arguments Value

View source: R/fusion_RIS_BLR.R

Description

Parallel Time-adapting Rejection-Importance Sampling Monte Carlo Fusion for Bayesian Logistic Regression model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
par_fusion_RIS_TA_BLR(
  N,
  dim,
  y_split,
  X_split,
  prior_means,
  prior_variances,
  time,
  m,
  C,
  power,
  precondition = FALSE,
  samples_to_fuse,
  sub_posterior_weights,
  ESS_threshold = 0.5,
  seed = NULL,
  level = 1,
  node = 1,
  n_cores = parallel::detectCores()
)

Arguments

N

number of samples

dim

dimension of the predictors (= p+1)

y_split

list of length m, where y_split[[c]] is the y responses for sub-posterior c

X_split

list of length m, where X_split[[c]] is the design matrix for sub-posterior c

prior_means

prior for means of predictors

prior_variances

prior for variances of predictors

time

time T for fusion algorithm

m

number of sub-posteriors to combine

C

overall number of sub-posteriors

power

exponent of target distribution

precondition

boolean value determining whether or not a preconditioning matrix is to be used

samples_to_fuse

list of length m, where samples_to_fuse[c] contains the samples for the c-th sub-posterior

sub_posterior_weights

vector of length m, where sub_posterior_weights[c] is the weight for sub-posterior c

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)

seed

seed number - default is NULL, meaning there is no seed

level

indicates which level this is for the hierarchy (default 1)

node

indicates which node this is for the hierarchy (default 1)

n_cores

number of cores to use

Value

A list with components:

samples

samples from fusion (resampled if ESS < N*ESS_threshold)

weighted_sampled

weighted samples

norm_weights

normalised weights (after Q step)

ESS

effective sample size

x_samples

samples after the first fusion step (after rho step)

rho_acc

rho acceptance rate

combined_y

combined y responses after fusion

combined_X

combined design matrix after fusion

time

time taken for fusion

resampled

boolean value to indicate whether or not samples were resampled

precondition_matrices

pre-conditioning matricies that were used


rchan26/BayesLogitFusion documentation built on June 13, 2020, 5:03 a.m.