mrs | R Documentation |
This function executes the Multi Resolution Scanning algorithm to detect differences across multiple distributions.
mrs(X, G, n_groups = length(unique(G)), Omega = "default", K = 6, init_state = NULL, beta = 1, gamma = 0.3, delta = NULL, eta = 0.3, alpha = 0.5, return_global_null = TRUE, return_tree = TRUE, min_n_node = 0)
X |
Matrix of the data. Each row represents an observation. |
G |
Numeric vector of the group label of each observation. Labels are integers starting from 1. |
n_groups |
Number of groups. |
Omega |
Matrix defining the vertices of the sample space.
The |
K |
Depth of the tree. Default is |
init_state |
Initial state of the hidden Markov process. The three states are null, altenrative and prune, respectively. |
beta |
Spatial clustering parameter of the transition probability matrix. Default is |
gamma |
Parameter of the transition probability matrix. Default is |
delta |
Optional parameter of the transition probability matrix. Default is |
eta |
Parameter of the transition probability matrix. Default is |
alpha |
Pseudo-counts of the Beta random probability assignments. Default is |
return_global_null |
Boolean indicating whether to return the posterior probability of the global null hypothesis. |
return_tree |
Boolean indicating whether to return the posterior representative tree. |
min_n_node |
Node in the tree is returned if there are more than |
An mrs
object.
Soriano J. and Ma L. (2016). Probabilistic multi-resolution scanning for two-sample differences. Journal of the Royal Statistical Society: Series B (Statistical Methodology). http://onlinelibrary.wiley.com/doi/10.1111/rssb.12180/abstract
set.seed(1) n = 20 p = 2 X = matrix(c(runif(p*n/2),rbeta(p*n/2, 1, 4)), nrow=n, byrow=TRUE) G = c(rep(1,n/2), rep(2,n/2)) ans = mrs(X=X, G=G)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.