bpr_gibbs.list: Gibbs sampling for the BPR model using list x

Description Usage Arguments Value See Also Examples

Description

bpr_gibbs.list computes the posterior of the BPR model using auxiliary variable approach. Since we cannot compute the posterior analytically, a Gibbs sampling scheme is used. This method calls bpr_gibbs.matrix to process each element of the list.

Usage

1
2
3
4
5
## S3 method for class 'list'
bpr_gibbs(x, w_mle = NULL, basis = NULL,
  fit_feature = NULL, cpg_dens_feat = FALSE, w_0_mean = NULL,
  w_0_cov = NULL, gibbs_nsim = 20, gibbs_burn_in = 10,
  is_parallel = TRUE, no_cores = NULL, ...)

Arguments

x

A list of elements of length N, where each element is an L x 3 matrix of observations, where 1st column contains the locations. The 2nd and 3rd columns contain the total trials and number of successes at the corresponding locations, repsectively.

w_mle

A matrix of MLE estimates for the regression coefficients for each genomic region of interest.

basis

A 'basis' object. See polynomial.object

fit_feature

Additional feature on how well the profile fits the methylation data.

cpg_dens_feat

Additional feature for the CpG density across the promoter region.

w_0_mean

The prior mean hyperparameter for w

w_0_cov

The prior covariance hyperparameter for w

gibbs_nsim

Optional argument giving the number of simulations of the Gibbs sampler.

gibbs_burn_in

Optional argument giving the burn in period of the Gibbs sampler.

is_parallel

Logical, indicating if code should be run in parallel.

no_cores

Number of cores to be used, default is max_no_cores - 2.

...

Additional parameters

Value

A list containing the following elements:

See Also

bpr_optim, bpr_optim.matrix

Examples

1
2
3
ex_data <- bpr_data
basis <- rbf.object(M=3)
out_opt <- bpr_gibbs(x = ex_data, is_parallel = FALSE, basis = basis)

andreaskapou/mpgex documentation built on May 12, 2019, 3:33 a.m.