Description Usage Arguments Value Author(s) References
fitDeltaGLM
is the core estimation function that constructs the statistical delta GLMM model from user input, and performs Bayesian estimation using JAGS.
1 | fitDeltaGLM(modelStructure = list(StrataYear.positiveTows = "random", VesselYear.positiveTows = "random", StrataYear.zeroTows = "random", VesselYear.zeroTows = "random", Catchability.positiveTows = "one", Catchability.zeroTows = "zero", year.deviations = "uncorrelated", strata.deviations = "uncorrelated"), covariates = list(positive = FALSE, binomial = FALSE), likelihood = "gamma", model.name = "deltaGLM.txt", fit.model = TRUE, mcmc.control = list(chains = 5, thin = 1, burn = 5000, iterToSave = 2000), Parallel = TRUE, Species = "NULL", logitBounds = c(-20, 20), logBounds = c(-20, 20), prior.scale = rep(25, 4))
|
modelStructure |
List specifying the model structure, including strata, year, and vessel effects
|
covariates |
List specifying whether covariates should be included in either model
|
likelihood |
Character string specifying the form of the positive model. Can be one of the following: "gamma" (or "gammaFixedCV"), "lognormal" (or "lognormalFixedCV"), "invGaussian" (or "invGaussianFixedCV"), "lognormalECE", "gammaECE", "poisson", "zt.poisson", or "negbin". Defaults to "gamma". The forms of the model are as follows:
|
model.name |
Character string specifying the name of the JAGS txt file that is written to the working directory. Defaults "to deltaGLM.txt" |
fit.model |
Boolean, specifying whether the model should be fit or not. Defaults to TRUE; if FALSE, just the JAGS script file is written. |
mcmc.control |
List, used to specify the MCMC parameters. These are
|
Parallel |
Whether to conduct estimation using parallel computing (faster), using the function jags.parallel(). Defaults to TRUE, but is currently only possible on Windows machines. If specified as TRUE on another operating system, estimation will be done, but not in parallel. |
Species |
Character string specifying the name of the species analyzed. This is mostly to prevent confusion with output, but must be entered as something other than "NULL". |
logitBounds |
2-element vector specifying bounds in the logit-link space, defaults to (-20, 20) |
logBounds |
2-element vector specifying bounds in the log-link space, defaults to (-20, 20) |
prior.scale |
Scale parameter for the variance parameter of the "randomExpanded" random effects. This is a 4 element vector, defaults to (25, 25, 25, 25), where the elements are (strataYear.positive, strataYear.presenceAbsence, vesselYear.positive, vesselYear.presenceAbsence) |
An list object with the following components:
modelFit |
The fitted JAGS object using R2jags. To access elements, use attach.jags(modelFit). |
functionCall |
A list containing the following elements. Many recycled from the
|
estimatedParameters |
A data frame containing the names of estimated parameters. |
Species |
The species name inputted by the user. |
Data |
The data frame (raw) used to estimate all parameters. |
Eric Ward and Jim Thorson, with help from the FRAM assessment team at the Northwest Fisheries Science Center.
Gelman, A. 2006. Prior distributions for variance parameters in hierarchical models. Bayesian analysis, 1(3):515-533.
Gelman, A., D.A. Van Dyk, Z. Huang, and W.J. Boscardin. 2007. Using redundant parameterizations to fit hierarchical models. Journal of Computational and Graphical Statistics, 17(1), 95<e2><80><93>122.
Plummer, M. 2012. JAGS Version 3.3.0 user manual. http://mcmc-jags.sourceforge.net/
Thorson, J.T., I. Stewart, and A.E. Punt. 2011. Accounting for fish shoals in single- and multi-species survey data using mixture distribution models. Can. J. Fish. Aquat. Sci., 68(9): 1681-1693.
Thorson, J.T. and E.J. Ward. 2013. Accounting for space<e2><80><93>time interactions in index standardization models. Fisheries Research, 147: 426-433.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.