Description Usage Arguments Details Value Examples
View source: R/2DLTfunctions.r
Calculates NHPP intensity in given region, using given detection hazard and perp. dist. distribution.
1 | poisint(y, x, ymin, ymax, hfun, b, pi.x, logphi, W, lscale = 1)
|
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 |
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.
NHPP intensities at all (x,y)
s input.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.