buildLLR.kernel: Build LLR function using kernel density estimation

View source: R/buildLLR.R

buildLLR.kernelR Documentation

Build LLR function using kernel density estimation

Description

Build LLR function using kernel density estimation

Usage

buildLLR.kernel(posScores, negScores, bw = 0.1, kernel = "gaussian")

Arguments

posScores

fitness scores in the positive reference set

negScores

fitness scores in the negative reference set

bw

the bandwith to use for kernel density estimation (see kdensity package for more info). This can either be a numerical value or the name of the algorithm used to automatically choose one.

kernel

the type of kernel to use (see kdensity package for more info)

Value

a list containing the LLR function in log10 scale and the positive and negative density functions

Examples

posScores <- rnorm(50,0.2,0.3)
negScores <- rnorm(30,0.8,0.2)
llr <- buildLLR.kernel(posScores,negScores,bw=0.1,kernel="gaussian")
drawDensityLLR(c(posScores,negScores),llr$llr,llr$posDens,llr$negDens,posScores,negScores)


jweile/maveLLR documentation built on July 19, 2022, 10:42 a.m.