F.start.limits: Set starting values and limits for parameters of Rdistance...

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

Description

Return reasonable starting values and limits (boundaries) for the parameters of distance functions. Starting values and limits are specified for all likelihoods and expansion terms. This function is called by other routines in Rdistance, and is not intended to be called by the user.

Usage

1
2
F.start.limits(like, expan, w.lo, w.hi, dist, covars = NULL,
  pointSurvey = FALSE)

Arguments

like

String specifying the likelihood for the distance function. Possible values are "hazrate" for hazard rate likelihood, "halfnorm" for the half normal likelihood, "uniform" for the uniform likelihood, "negexp" for the negative exponential likelihood, and "Gamma" for the gamma likelihood.

expan

Number of expansion terms to include. Valid values are 0, 1, ..., 3.

w.lo

Lower or left-truncation limit of the distances. Normally, 0.

w.hi

Upper or right-truncation limit of the distances. This is the maximum off-transect distance that could be observed.

dist

The vector of observed off-transect distances being analyzed. This vector is only required for like = "Gamma" and "halfnorm".

covars

Matrix of covariate values.

pointSurvey

Boolean. TRUE if point transect data, FALSE if line transect data.

Details

The number of parameters to be fitted is expan + 1 + 1*(like %in% c("hazrate", "uniform")). This is the length of all vectors returned in the output list.

Value

A list containing the following components

start

Vector of reasonable starting values for parameters of the likelihood and expansion terms.

lowlimit

Vector of lower limits for the likelihood parameters and expansion terms.

uplimit

Vector of upper limits for the likelihood parameters and expansion terms.

names

Vector of names for the likelihood parameters and expansion terms.

Author(s)

Trent McDonald, WEST Inc., tmcdonald@west-inc.com
Aidan McDonald, WEST Inc., aidan@mcdcentral.org

See Also

dfuncEstim

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
F.start.limits("uniform", 0, 0, 1000)
  F.start.limits("uniform", 1, 0, 1000)
  F.start.limits("uniform", 2, 0, 1000)
  F.start.limits("uniform", 3, 0, 1000)
  
  F.start.limits("halfnorm", 0, 0, 1000, 500*runif(100))
  F.start.limits("halfnorm", 1, 0, 1000, 500*runif(100))
  F.start.limits("halfnorm", 2, 0, 1000, 500*runif(100))
  F.start.limits("halfnorm", 3, 0, 1000, 500*runif(100))
  
  F.start.limits("hazrate", 0, 0, 1000)
  F.start.limits("hazrate", 1, 0, 1000)
  F.start.limits("hazrate", 2, 0, 1000)
  F.start.limits("hazrate", 3, 0, 1000)
  
  F.start.limits("negexp", 0, 0, 1000)
  F.start.limits("negexp", 1, 0, 1000)
  F.start.limits("negexp", 2, 0, 1000)
  F.start.limits("negexp", 3, 0, 1000)
  
  F.start.limits("Gamma", 0, 0, 1000, 1000*runif(100))

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