fyx: Waiting distance pdf

Description Usage Arguments Details Value Examples

View source: R/2DLTfunctions.r

Description

Calculates the pdf of the 'waiting distance' f(y,x)=h(y,x)*\exp(-\int_y^{ystart} h(t,x) dt).

Usage

1
fyx(y, x, b, hr, ystart, nint = 100)

Arguments

y

scalar or vector; forward distance

x

scale or vector; perp. distance

b

two-element vector of hazard rate parameters, some of whihc may be logged

hr

hazard rate function

ystart

max forward distance at which could possibly detect animal (see details).

nint

number of intervals in numerical integration.

Details

Need to ensure the hazard function has decayed to (very close to) zero by ystart.

Value

pdf of waiting distance at x,y

Examples

1
2
3
4
w=1; ystart=4
gridx=seq(0,w,length=50); gridy=seq(0,ystart,length=50)
f=outer(gridy,gridx,FUN=fyx,b=c(-0.2876821, -2.3025851),hr=h2,ystart)
persp(gridx,gridy,t(f),theta=45,phi=35,zlab="f(y|x)")

david-borchers/LT2D documentation built on Aug. 17, 2020, 1:37 a.m.