Description Details Author(s) References Examples

This package fits the Acceptance-rejection Markov tree (ARM-tree) for comparison between distributions. The model is based on a nonparametric process taking the form of a Markov model that transitions between a "reject" and a "accept" state on a multi-resolution partition tree of the sample space. The ARM-tree effectively detect and characterize a variety of underlying differences. These differences can be visualized using several plotting functions.

Package: | ARMtree |

Type: | Package |

Version: | 1.0 |

Date: | 2014-08-01 |

License: | GPL (>= 3) |

Authors: | Jacopo Soriano and Li Ma |

Maintainer: | Jacopo Soriano <[email protected]> |

Soriano J. and Ma L. (2014). Multi-resolution two-sample comparison
through acceptance-rejection Markov trees. *Preprint*. http://arxiv.org/abs/1404.3753

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | ```
## EXAMPLE 1D ##
set.seed(1)
p = 1
n1 = 200
n2 = 200
mu1 = matrix( c(0,10), nrow = 2, byrow = TRUE)
mu2 = mu1; mu2[2] = mu1[2] + .01
sigma = c(1,.1)
Z1 = sample(2, n1, replace=TRUE, prob=c(0.9, 0.1))
Z2 = sample(2, n2, replace=TRUE, prob=c(0.9, 0.1))
X1 = mu1[Z1] + matrix(rnorm(n1*p), ncol=p)*sigma[Z1]
X2 = mu2[Z2] + matrix(rnorm(n2*p), ncol=p)*sigma[Z1]
X = rbind(X1, X2)
G = c(rep(1, n1), rep(2,n2))
ans = ARMT(X, G, K=10)
out = summary(ans)
plot1D(ans, type = "rej")
## EXAMPLE 2D ##
set.seed(1)
p = 2
n1 = 200
n2 = 200
mu1 = matrix( c(9,9,0,4,-2,-10,3,6,6,-10), nrow = 5, byrow=TRUE)
mu2 = mu1; mu2[2,] = mu1[2,] + 1
Z1 = sample(5, n1, replace=TRUE)
Z2 = sample(5, n2, replace=TRUE)
X1 = mu1[Z1,] + matrix(rnorm(n1*p), ncol=p)
X2 = mu2[Z2,] + matrix(rnorm(n2*p), ncol=p)
X = rbind(X1, X2)
colnames(X) = c(1,2)
G = c(rep(1, n1), rep(2,n2))
ans = ARMT(X, G, K=10)
plot2D(ans, type = "rej", legend = TRUE)
``` |

jacsor/ARMtree2 documentation built on May 17, 2017, 6:49 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.