skernel: Stratified Kernel

Description Usage Arguments Details Value References Examples

Description

This function defines a stratified kernel for metabolite abundance level measurements.

Usage

1
skernel(x, y, rho)

Arguments

x

a numerical scalar or vector of metabolomic measurements.

y

a numerical scalar or vector of metabolomic measurements.

rho

a positive kernel shape parameter.

Details

This function calculates a stratified kernel function skernel between two metabolomic measurements x and y. Suppose the metabolite-set contains p metabolites. Then measurements x and y have p components. Let x_i be the ith component of x. If x_i=0, then the ith metabolite in the metabolite-set is absent. If x_i>0, then the ith metabolite is present and x_i measures the abundance level of the ith metabolite. Measurements x and y are said to from the same stratum if they have the same set of metabolites being absent (present). If x and y are from the same stratum, then skernel(x,y,ρ) is assigned a Gaussian kernel with kernel parameter ρ. Otherwise skernel(x,y,ρ) is defined to be 0. More details can be found in Zhan et al. (2015).

Value

A non-negative real value.

References

Zhan, X., Patterson, A. D., & Ghosh, D. (2015). Kernel approaches for differential expression analysis of mass spectrometry-based metabolomics data. BMC Bioinformatics, 16(1), 77.

Examples

1
2
3
4
5
6
	x=c(0,0,1,2)
	y=c(0,1,2,0)
	z=c(0,0,3,4)
	## x and z are from the same stratum while x and y are not. 
	skernel(x,y,1)
	skernel(x,z,1)

Example output

[1] 0
[1] 1.125352e-07

KMDA documentation built on May 2, 2019, 3:59 p.m.