Description Usage Arguments Value
View source: R/groupwise_density.R
In order to compare the distributions of different groups within the same multivariate space, calculates the nearest-neighbor densities of each point in the whole data set according to the distribution of each subset.
1 | groupwise.density(X, groups, method = "euclidean", p.neighbors = 0.01, init.info = NULL)
|
X |
a matrix of numeric data |
groups |
a factor or vector that can be coerced into a factor, specifying
which group each row of |
method |
see |
p.neighbors |
the proportion of each groups neighbors that should be visited. Proportions are necessary when groups have different sizes because otherwise the densities aren't as comparable. |
init.info |
see |
an nrow(X)
by nlevels(as.factor(groups))
matrix of
nearest-neighbor density estimates.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.