overton_like: Overton-like subtraction of densities.

Description Usage Arguments Details Value Author(s) Examples

View source: R/ovtsub.R

Description

This function computes an Overton-like subtraction of two densities. It calculates the proportion of the reference density that is above a reference

Usage

1
overton_like(ref, test, twosided = FALSE)

Arguments

ref

The reference channel specified as a vector

test

The test (potentially positive) channel specified as a vector

twosided

boolean flag testing whether the area of the density of the test curve above the reference curve will be calculated on both sides of the mode of the test curve (TRUE) or only on the positive side of the mode (FALSE, default).

Details

The test can be one-sided or two-sided. If one sided, it tests the region of the test density that is above the mode of the reference density. If two-sided it will look at the regions on either side of the mode of the reference density. Densities are computed on a grid of 1024, and appropriately normalized.

Value

numeric value representing the proportion of the area of the test density above the reference density.

Author(s)

Greg Finak

Examples

1
2
3
A = rnorm(10000,mean=1,sd=0.5)
B = rnorm(10000,mean=2,sd=0.5)
overton_like(A,B)

flowStats documentation built on Nov. 8, 2020, 6:49 p.m.