simXY: Simulate sightings given a known perpendicular density...

Description Usage Arguments Details Value Examples

View source: R/2DLTfunctions.r

Description

Simulates sightings from a known population given a density distribution and hazard rate. This function has been replaced by sim.n.

Usage

1
2
simXY(N, pi.x, logphi, hr, b, w, ystart, xSampL = 1000,
  discardNotSeen = TRUE, ...)

Arguments

N

animal population

pi.x

function describing the perpendicular distance density distribution

logphi

parameters for pi.x (some maybe logged)

hr

function describing the hazard rate

b

hazard rate parameter vector

w

truncation distance

ystart

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

xSampL

length of x-dimension vector to sample perpendicular distances from.

discardNotSeen

boolean; discard individuals not detected. See details

...

arguments to be passed into simnhPP

Details

if discardNotSeen=FALSE individuals that are not detected are assigned y-dimension distances = -999, otherwise discardNotSeen=TRUE invididuals are removed and not returned

Value

list of $locs x and y coordinates for simulated sightings and $settings simulation settings.

Examples

1
2
3
4
5
6
7
8
ystart=4;w=1
hr=h2; b=log(c(0.75,1))
pi.x=pi.norm; logphi=c(0.5,log(0.2))
N=50 #true number of animals
#generate some observations
simDat=simXY(N=N,pi.x=pi.x,logphi=logphi,
hr=hr,b=b,w=w,ystart=ystart)
x=simDat$locs$x; y=simDat$locs$y 

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