Description Usage Arguments Examples
mpgex_cluster
is a wrapper function that clusters similar methylation
profiles using the Gibbs sampling algorithm. Initially, it performs parameter
checking, and initializes main parameters, such as mixing proportions, basis
function coefficients, then Gibbs is applied and finally model selection
metrics are calculated, such as BIC and AIC.
1 2 3 4 |
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. |
K |
Integer denoting the number of clusters K. |
pi_k |
Vector of length K, denoting the mixing proportions. |
w |
A MxK matrix, where each column contains the basis function coefficients for the corresponding cluster. |
basis |
A 'basis' object. E.g. see |
w_0_mean |
The prior mean hyperparameter for w |
w_0_cov |
The prior covariance hyperparameter for w |
gibbs_nsim |
Argument giving the number of simulations of the Gibbs sampler. |
gibbs_burn_in |
Argument giving the burn in period of the Gibbs sampler. |
opt_method |
Optimization method used. |
opt_itnmax |
Optimization iterations for obtaining the initial EM parameter values. |
is_parallel |
Logical, indicating if code should be run in parallel. |
no_cores |
Number of cores to be used, default is max_no_cores - 1. |
is_verbose |
Logical, print results during EM iterations |
1 2 3 4 | set.seed(123)
ex_data <- bpr_data
mpgex_clust <- mpgex_cluster_bayes(x = ex_data, gibbs_nsim = 20, gibbs_burn_in = 10,
is_parallel = FALSE, opt_itnmax = 10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.