densityauc: densityauc - Calculate the AUC of a density object

Description Usage Arguments Value Examples

Description

This function will calculate the AUC of a density object generated by the 'density' function.

Usage

1

Arguments

dens

a density object

window

a vector with two values, specifying the left and right borders for the AUC to be calculated

Value

a numeric value for the density AUC

Examples

1
2
3
4
5
6
7
8
9
set.seed(1)
a<-rnorm(1000)
d<-density(a)
window<-c(2,3)
da<-densityauc(d,window)

plot(d,main='')
abline(v=window,lty=2)
title(paste0('AUC between lines=',da))

federicogiorgi/vulcan documentation built on May 27, 2019, 7:25 a.m.