vol3d: Calculate 3DKUD volume

View source: R/vol3d.R

vol3dR Documentation

Calculate 3DKUD volume

Description

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

Usage

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

## 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 Aug. 22, 2023, 9:44 a.m.