simnhPP: Simulate forward distances

Description Usage Arguments Details Value See Also Examples

View source: R/2DLTfunctions.r

Description

Simulate non-homogeneous Poisson Process data by solving inverse CDF. This function has been replaced by sim.n.

Usage

1
simnhPP(x, b, ystart, hr, miss = TRUE, ylo = 1e-05)

Arguments

x

scale or vector; perpendicular distance observations

b

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

ystart

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

hr

hazard rate function

miss

If TRUE, allows animals not detected by y=0 to have no y.

ylo

minimum forward distance.

Details

miss allows a fixed number of animal to be simulated i.e. known $N$ in strip, or $n$ where animals may have been missed.

Value

vector of y distances if miss=TRUE missed animals represented by -999, otherwise no animals are missed.

See Also

simXY

Examples

1
2
3
4
5
6
7
8
9
ystart=4
hr=h2; b=log(c(0.75,1))
X=runif(50,0,1)
Y=simnhPP(x=X,b=b,ystart=ystart,
hr=h2,miss=TRUE)
length(Y[Y!=-999])
Y=simnhPP(x=X,b=b,ystart=ystart,
hr=h2,miss=FALSE)
length(Y[Y!=-999])

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