groupwise.density: Searches Subsets for Nearest Neighbor Densities

Description Usage Arguments Value

View source: R/groupwise_density.R

Description

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.

Usage

1
groupwise.density(X, groups, method = "euclidean", p.neighbors = 0.01, init.info = NULL)

Arguments

X

a matrix of numeric data

groups

a factor or vector that can be coerced into a factor, specifying which group each row of X belongs to.

method

see diss

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 diss

Value

an nrow(X) by nlevels(as.factor(groups)) matrix of nearest-neighbor density estimates.


dissUtils documentation built on May 1, 2019, 7:28 p.m.