yDistForg: Determine minimum forward distance for simulated data that...

Description Usage Examples

View source: R/2DLTsimulator.R

Description

This is a helper function for simulating data with g(0)<1. The function calculates a minimum forward distance, y_{min}, to truncate simulated data, i.e. simulated sightings with y_i<y_{min} are deleted.

@details The idea behind this function is that simulated data with y_i<y_{min} would got have been detected at a given g(0)<1. The y_{min} for a given g(0)<1 is solved using optimise(). The resulting y_{min} is substracted from the remaining simulated observations. @param gy desired detectability at y=0 @param ymax largest forward distance @param b vector of detection hazard function parameters @param hfun detection hazard function @param tolerance passed into optimize()

Usage

1
yDistForg(gy, ymax, b, hfun, tolerance = 1e-04, ...)

Examples

1
2
3
4
5
6
7
## Not run: 
###No bump.
minY=yDistForg(gy=0.8,ymax=dfit.hn$ystart,b=dfit.hn$b,hfun=dfit.hn$hr)
minY
1-Sy(y=minY,x=0,ymax=dfit.hn$ystart,b=dfit.hn$b,hfun=dfit.hn$hr)

## End(Not run)

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