vol3d: Calculate 3DKUD volume

Description Usage Arguments Value Examples

View source: R/vol3d.R

Description

Helper function to calculate 3DKUD volume for a 'kde' object

Usage

1
vol3d(fhat, cont = NULL)

Arguments

fhat

a kernel density estimate object of class 'kde'. see ?kde using the 'ks' package

cont

voxel contour for which volume will be calulated (e.g. 50, 95)

Value

A numeric vector with volume of kde object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Import detection data
data(exampletag)

## Estimate 3D kernel density using the ks package
library(ks)
H.pi <- Hpi(exampletag, binned = TRUE) * 3
fhat <- kde(exampletag, H = H.pi)

## Calculate 3D KUD volume
vol3d(fhat = fhat, cont = 50)   ## volume of 50% contour in m3
vol3d(fhat = fhat, cont = 95)   ## volume of 95% contour in m3

vinayudyawer/KUD3D documentation built on March 26, 2020, 12:17 a.m.