distMode: Mode of continuous distributions

Description Usage Arguments Value Examples

Description

This function computes the mode for continuous distributions

Usage

1
distMode(x, adj = 1)

Arguments

x

Numeric data vector

adj

Number indicating the adjustment for the kernel bandwidth

Value

Number

Examples

1
2
3
4
5
6
7
8
data(bcellViper, package="bcellViper")
d1 <- exprs(dset)
mean(d1[, 1])
median(d1[, 1])
distMode(d1[, 1])
plot(density(d1[, 1]))
abline(v=c(mean(d1[, 1]), median(d1[, 1]), distMode(d1[, 1])), col=c("green", "red", "blue"))
legend("topleft", c("Mean", "Median", "Mode"), col=c("green", "red", "blue"), lwd=4)

viper documentation built on Nov. 8, 2020, 7:37 p.m.