poisint: NHPP intensity calculation in region

Description Usage Arguments Details Value Examples

View source: R/2DLTfunctions.r

Description

Calculates NHPP intensity in given region, using given detection hazard and perp. dist. distribution.

Usage

1
poisint(y, x, ymin, ymax, hfun, b, pi.x, logphi, W, lscale = 1)

Arguments

y

forward distances at which to calculate intensities (vector)

x

perpendicular distances at which to calculate intensities (must be same length as y).

ymin

smallest forward distance

ymax

largest forward distance

hfun

detection hazard function

b

vector of detection hazard function parameters

pi.x

perpendicular distance distribution function

logphi

vector with log of pi.x parameters

W

perpendicular truncation distance

lscale

output of calc.lpars (object of class “ppscale”)

Details

Calculates survival model pdf of forward distance y, given perpendicular distance x (f(y|x).), multiplies this by the perpendicular distance pdf pi.x and then scales it by multiplying by lscale (in order to get some total intensity - typically that to generate some expected sample size). See calc.lpars for details of the scaling.

This function is called by rpoispp inside sim.n to generate samples from NHPPs.

Value

NHPP intensities at all (x,y)s input.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
n=100;ymin=0.01;ymax=5;W=2
b=log(c(0.75,1));logphi=c(0.5,log(0.3))
nf=100
ys=seq(ymin,ymax,length=nf)
intscale=calc.lpars(n,ymin,ymax,W,h2,b,pi.norm,logphi)
f=poisint(ys,rep(0,nf),ymin=ymin,ymax=ymax,hfun=h2,b=b,pi.x=pi.norm,logphi=logphi,W=W,lscale=intscale$lscale)
plot(ys,f,type="l",xlab="Forward distance (y)",ylab="f(y)")

## End(Not run)

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