F.gx.estim: Estimate g(0) or g(x)

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Estimate g(0) or g(x) for a specified distance function.

Usage

1
F.gx.estim(fit, x.scl = NULL, g.x.scl = NULL, observer = NULL)

Arguments

fit

An estimated dfunc object. See dfuncEstim.

x.scl

The x coordinate (a distance) at which to scale the distance function to g.x.scl. See Details.

g.x.scl

Height of the distance function at coordinate x. i.e., the distance function will be scaled so that g(x.scl) = g.x.scl. See Details.

observer

A numeric scalar or text string specifying whether observer 1 or observer 2 or both were full-time observers. This parameter dictates which set of observations form the denominator of a double observer system. If, for example, observer 2 was a data recorder and part-time observer, or if observer 2 was the pilot, set observer = 1. If observer = 1, observations by observer 1 not seen by observer 2 are ignored. The estimate of detection in this case is the ratio of number of targets seen by both observers to the number seen by both plus the number seen by just observer 2. If observer = "both", the computation goes both directions.

Details

There are several estimation cases covered by the inputs x.scl and g.x.scl:

(1) g(0) = 1 (the default): Inputs are x.scl = 0, g.x.scl = 1. Note that x.scl will be set to w.lo, which is not necessarily 0.

(2) User specified g(x.scl) = g.x.scl: Inputs are x.scl = a number greater than or equal to w.lo, g.x.scl = a number between 0 and 1.

(3) Maximum g() specified: Inputs are x.scl="max", g.x.scl = a number between 0 and 1. In this case, g() is scaled such that g(x.max) = g.x.scl, where x.max is the distance that maximizes g. x.max is computed and returned.

(4) Maximum g() estimated by double observer system: Inputs are x.scl="max", g.x.scl = a data frame. In this case, g(x.max) = h, where x.max is the distance that maximizes g and h is the height of g() at x.max. h is computed from the double observer data frame (see below for structure of the double observer data frame).

(5) Distance of independence specified, height computed from double observer system: Inputs are x.scl = a number greater than or equal to w.lo g.x.scl = a data frame. In this case, g(x.scl) = h, where h is computed from the double observer data frame (see below for structure of the double observer data frame).

When x.scl, g.x.scl, or observer are NULL, the routine will look for $call.x.scl, or $call.g.x.scl, or $call.observer components of the fit object. This means the 3 parameters to be specified during the original call to dfuncEstim. Later, different values can be specified in a call to F.gx.estim without having to re-estimate the distance function. Because of this feature, the default values of x.scl = 0 and g.x.scl = 1 and observer = "both" are specified in the call to dfuncEstim.

Structure of the double observer data frame: When g.x.scl is a data frame, it is assumed to contain the components $obsby.1 and $obsby.2 (no flexibility on names). These components are TRUE/FALSE (logical) vectors indicating whether observer 1 (obsby.1) or observer 2 (obsby.2) spotted the target.

Value

A list comprised of the following components:

x.scl

The value of x (distance) at which g() is evaluated.

comp2

The estimated value of g() when evaluated at x.scl.

Author(s)

Trent McDonald, WEST Inc., tmcdonald@west-inc.com

See Also

dfuncEstim

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
  # NOTE, this example is out of date as of version 2.0.x
  # Non-double observer example
  set.seed(555574)
  x <- rnorm(1000) * 100
  x <- x[ 0 < x & x < 100 ]
  un.dfunc <- dfuncEstim( x, likelihood="uniform", w.hi = 100)    
  F.gx.estim(un.dfunc)
  gam.dfunc <- dfuncEstim( x, likelihood="Gamma", w.hi = 100)    
  F.gx.estim(gam.dfunc)
  
  # Double observer example
  dbl.obs <- data.frame(obsby.1=rbinom(50,1,0.8), obsby.2=rbinom(50,1,0.7))
  F.gx.estim(un.dfunc, x.scl=0, g.x.scl=dbl.obs, observer="both" )
  # a warning about x.scl < $w.lo is issued.
  F.gx.estim(un.dfunc, x.scl="max", g.x.scl=dbl.obs, observer="both" )
  F.gx.estim(un.dfunc, x.scl="max", g.x.scl=dbl.obs, observer=1 )
  
## End(Not run)

Rdistance documentation built on May 2, 2019, 3:49 a.m.