Data_Fn: Build data input for geostatistical delta-GLMM

Description Usage Arguments Value

View source: R/Data_Fn.R

Description

Data_Fn builds a tagged list of data inputs used by TMB for running the model

Usage

1
2
3
4
5
6
7
Data_Fn(Version, FieldConfig, ObsModel = 2, b_i, a_i, s_i, t_i, a_xl,
  MeshList, GridList = NULL, Method = "Mesh", v_i = rep(0, length(b_i)),
  PredTF_i = rep(0, length(b_i)), X_xj = NULL, X_xtp = NULL,
  Q_ik = NULL, Aniso = 1, RhoConfig = c(Beta1 = 0, Beta2 = 0, Epsilon1 =
  0, Epsilon2 = 0), Options = c(SD_site_density = 0, SD_site_logdensity = 0,
  Calculate_Range = 0, Calculate_evenness = 0, Calculate_effective_area = 0),
  CheckForErrors = TRUE, Alpha = 2)

Arguments

Version

a version number (see example for current default).

FieldConfig

a vector of format c("Omega1"=0, "Epsilon1"=10, "Omega2"="AR1", "Epsilon2"=10), where Omega refers to spatial variation, Epsilon refers to spatio-temporal variation, Omega1 refers to variation in encounter probability, and Omega2 refers to variation in positive catch rates, where 0 is off, "AR1" is an AR1 process, and >0 is the number of elements in a factor-analysis covariance

ObsModel

an optional integer that specifies the distribution for positive catch rates (Default=2, i.e., Gamma)

ObsModel=0

Normal

ObsModel=1

Lognormal

ObsModel=2

Gamma

ObsModel=11

Mixture lognormal

ObsModel=12

Mixture gamma

ObsModel=4

Zero-adjusted negative binomial

ObsModel=5

Zero-inflated negativee binomial

ObsModel=6

Conway-Maxwell-Poisson distribution

b_i

Sampled biomass for each observation i

a_i

Sampled area for each observation i

s_i

Spatial knot (e.g., grid cell) for each observation i

t_i

Time interval (e.g., year) for each observation i

a_xl

Area associated with each knot

MeshList,

tagged list representing location information for the SPDE mesh hyperdistribution

GridList,

tagged list representing location information for the 2D AR1 grid hyperdistribution

Method,

character (either "Mesh" or "Grid") specifying hyperdistribution (Default="Mesh")

v_i

OPTIONAL, sampling category (e.g., vessel or tow) associated with overdispersed variation for each observation i

PredTF_i

OPTIONAL, whether each observation i is included in the likelihood (PredTF_i[i]=0) or in the predictive probability (PredTF_i[i]=1)

X_xj

OPTIONAL, matrix of static density covariates (e.g., measured variables affecting density, as used when interpolating density for calculating an index of abundance)

X_xtp

OPTIONAL, array of dynamic (varying among time intervals) density covariates

Q_ik

OPTIONAL, matrix of catchability covariates (e.g., measured variables affecting catch rates but not caused by variation in species density) for each observation i

Aniso

OPTIONAL whether to assume isotropy (Aniso=0) or geometric anisotropy (Aniso=1)

RhoConfig

OPTIONAL, vector of form c("Beta1"=0,"Beta2"=0,"Epsilon1"=0,"Epsilon2"=0) specifying whether either intercepts (Beta1 and Beta2) or spatio-temporal variation (Epsilon1 and Epsilon2) is structured among time intervals

Options

OPTIONAL, a vector of form c('SD_site_density'=0,'SD_site_logdensity'=0,'Calculate_Range'=0,'Calculate_evenness'=0,'Calculate_effective_area'=0), where Calculate_Range=1 turns on calculation of center of gravity, and Calculate_effective_area=1 turns on calculation of effective area occupied

CheckForErrors

OPTIONAL, whether to check for errors in input (NOTE: when CheckForErrors=TRUE, the function will throw an error if it detects a problem with inputs. However, failing to throw an error is no guaruntee that the inputs are all correct)

Alpha

order of SPDE mesh (default = 2, alternative = 1)

Value

Tagged list containing inputs to function Build_TMB_Fn()


nwfsc-assess/geostatistical_delta-GLMM documentation built on Jan. 6, 2019, 2:09 a.m.