NLL_dynamic_contrast: Function for fitting the GVRDM and Aksnes and Utne model

Description Usage Arguments

View source: R/NLL_dynamic_contrast.R

Description

Generalized visual reaction distance model and Aksnes and Utne model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
NLL_dynamic_contrast(
  rr,
  cc,
  Ap = NA,
  C0 = NA,
  Eprime = NA,
  prey.types = NA,
  prey = NA,
  prey.size = NA,
  tt = NA,
  tt1 = NA,
  tt2 = NA,
  tt3 = NA,
  tt4 = NA,
  Ke,
  Ke.trans = FALSE,
  Eb,
  angle = NA,
  kd = NA,
  kd.mult = NA,
  beta = NA,
  kk = NA,
  delta = NA,
  alpha = 1,
  sigma = NA,
  rr.log = TRUE,
  NVrd = NA,
  NVthreshold = 0,
  NVsigma = NA,
  fit.model = TRUE,
  fit.obs = TRUE,
  ccoffset = NA,
  silent = F,
  ...
)

Arguments

rr

Reaction distance

cc

Effective attenuation coefficient or beam attenuation coefficient

Ap

Prey area. If Ap and C0 are not provided, tt will be estimated.

C0

Prey inherent contrast. If Ap and C0 are not provided, tt will be estimated.

Eprime

Composite saturation parameter.

prey.types

A vector specifying unique prey name categories that are passed to 'prey.' Used if parameters are simultaneously estimated for multiple prey types.

prey

Vector of prey names for each observation.

prey.size

Vector of prey size

tt

T parameter for prey type 0. Default = NA

tt1

T parameter for prey type 1. Default = NA

tt2

T parameter for prey type 2. Default = NA

tt3

T parameter for prey type 3. Default = NA

tt4

T parameter for prey type 4. Default = NA

Ke

Half-saturation constant

Ke.trans

Should Ke be transformed in the model?

Eb

# Light level

angle

Nadir viewing angle in degrees

kd

Diffuse attenuation coefficient of downwelling irradiance

kd.mult

Multiplier to convert beam attenuation

beta

Dynamic scaling function intercept parameter

delta

Dynamic scaling function shape parameter

alpha

Naka-Rushton exponent. Default = 1

sigma

Standard deviation of visual reaction distance

rr.log

Are visual errors lognormal distribution? Default = TRUE

NVrd

Non-visual reaction distance. Default = NA (only fit visual component of the model)

NVthreshold

Light threshold for non-visual reaction. Default = NA(only fit visual component of the model)

NVsigma

Standard deviation of non-visual reaction distance. Default = NA(only fit visual component of the model)

fit.model

Logical.Should the model be fitted? If FALSE, produces model diagnostics and predictions based on provided parameters.

fit.obs

Logical. Should observations be used to calculate a likelihood?

ccoffset

Shift kappa or beam attenuation? Default = NA results in no shift.

silent

Logical. Should diagnostic plots be produced?

hh

Dynamic scaling function rate parameter

return

If fit.model is TRUE, returns the negative log likelihood. If fit is FALSE, returns model diagnostics and predictions using parameters that are passed to the model.


sean-rohan-NOAA/GVRDM documentation built on Dec. 22, 2021, 11:14 p.m.