startLimits: startLimits - Distance function starting values and limits

View source: R/startLimits.R

startLimitsR Documentation

startLimits - Distance function starting values and limits

Description

Returns starting values and limits (boundaries) for the parameters of distance functions. This function is called by other routines in Rdistance, and is not intended to be called by the user. Replace this function in the global environment to change boundaries and starting values.

Usage

startLimits(ml)

Arguments

ml

Either a Rdistance 'model frame' or an Rdistance 'fitted object'. Both are of class "dfunc". Rdistance 'model frames' are lists containing components necessary to estimate a distance function, but no estimates. Rdistance 'model frames' are typically produced by calls to parseModel. Rdistance 'fitted objects' are typically produced by calls to dfuncEstim. 'Fitted objects' are 'model frames' with additional components such as the parameters estimates, log likelihood value, convergence information, and the variance- covariance matrix of the parameters.

Value

A list containing the following components

start

Vector of 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.

The length of each vector in the return is: (Num expansions) + 1 + 1*(like %in% c("hazrate")) + (Num Covars).

See Also

dfuncEstim

Examples

  data(sparrowDf)
  
  # Half-normal start limits
  modList <- parseModel(
       data = sparrowDf
     , formula = dist ~ 1
     , likelihood = "halfnorm"
  )
  startLimits(modList)
  
  # Half-normal with expansions
  modList <- parseModel(
       data = sparrowDf
     , formula = dist ~ 1
     , likelihood = "halfnorm"
     , expansions = 3
  )
  startLimits(modList)
  
  # Hazard rate start limits
  modList$likelihood <- "hazrate"
  startLimits(modList)
  
  # Neg exp start limits
  modList$likelihood <- "negexp"
  startLimits(modList)
  
  

tmcd82070/Rdistance documentation built on April 13, 2025, 1:38 p.m.