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

Description Usage Arguments Value See Also Examples

Description

bpr_gibbs.matrix computes the posterior of the BPR model using auxiliary variable approach. Since we cannot compute the posterior analytically, a Gibbs sampling scheme is used.

Usage

1
2
3
4
## S3 method for class 'matrix'
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, ...)

Arguments

x

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 vector of parameters (i.e. coefficients of the basis functions) containing the MLE estimates.

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.

...

Additional parameters

Value

A list containing the following elements:

See Also

bpr_optim, bpr_optim.list

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
basis <- polynomial.object(M=2)
w <- c(0.1, 0.1, 0.1)
w_0_mean <- rep(0, length(w))
w_0_cov <- diag(10, length(w))
data <- bpr_data[[1]]
out_opt <- bpr_gibbs(x = data, w_mle = w, w_0_mean = w_0_mean,
                     w_0_cov = w_0_cov, basis = basis)

basis <- polynomial.object(M=0)
w <- c(0.1)
w_0_mean <- rep(0, length(w))
w_0_cov <- diag(10, length(w))
data <- bpr_data[[1]]
out_opt <- bpr_gibbs(x = data, w_mle = w, w_0_mean = w_0_mean,
                     w_0_cov = w_0_cov, basis = basis)

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