Build_TMB_Fn: Build TMB object for geostatistical delta-GLMM

View source: R/Build_TMB_Fn.R

Build_TMB_FnR Documentation

Build TMB object for geostatistical delta-GLMM

Description

Build_TMB_Fn builds a tagged list with everything necessary to run or interpret inputs to a geostatistical delta-GLMM

Usage

Build_TMB_Fn(TmbData, Version, VesselConfig = c(Vessel = 0, VesselYear = 0),
  Q_Config = TRUE, CovConfig = TRUE, RhoConfig = c(Beta1 = 0, Beta2 = 0,
  Epsilon1 = 0, Epsilon2 = 0), Method = "Mesh", ConvergeTol = 1,
  Use_REML = FALSE, loc_x = NULL, Parameters = "generate",
  Random = "generate", Map = "generate", DiagnosticDir = NULL,
  TmbDir = system.file("executables", package = "SpatialDeltaGLMM"),
  RunDir = getwd(), silent = FALSE)

Arguments

TmbData,

a tagged list of data inputs generated by Data_Fn

Version

a version number (see example for current default).

VesselConfig,

a vector of form c("Vessel"=0,"VesselYear"=0) turning off vessel or vessel-year effects

Q_Config,

a boolean whether to estimate catchability covariates (Q_ik in the TmbData input) or not

CovConfig,

a boolean whether to estimate density covariates (X_xj and X_xtp in the TmbData input) or not

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

Method

Spatial method used for estimation (determines bounds for logkappa)

ConvergeTol,

OPTIONAL override for TMB convergence criteria

Use_REML,

OPTIONAL boolean whether to use maximum marginal likelihood or restricted maximum likelihood (termed "REML")

loc_x

OPTIONAL, location for each sample used to generate plausible bounds for scale parameter

Parameters

OPTIONAL, a tagged list of starting parameters

Random

OPTIONAL, a character vector of random effects

Map

OPTIONAL, a tagged list of parameters to either mirror or turn off

DiagnosticDir

OPTIONAL, a directory where diagonstic runtime information should be stored

TmbDir

OPTIONAL, a directory where the CPP file for the VAST model can be found locally

RunDir

OPTIONAL, a directory where the CPP file is copied, copiled, and run (must have write privileges or else the function will crash)

silent

Boolean, whether TMB should run silently

Value

Tagged list containing objects for running a VAST model

Obj

The built TMB object

Upper

A vector of upper bounds for parameters, optionally for use during optimization

Lower

A vector of lower bounds for parameters, optionally for use during optimization

Parameters

A tagged list of parameter starting values used when building Obj, which can be extracted, modified, and then put back into Build_TMB_Fn to define different starting values

Map

A taggged list of parameters to be turned off or mirrored, for similar use as Parameters

Random

A character vector of random effects, for similar use as Parameters


nwfsc-assess/geostatistical_delta-GLMM documentation built on July 8, 2023, 4:49 a.m.