Skip to contents

英文原页:cmsy_defaults()

说明

本函数列出CMSY++代码的通用设置(CMSY++16.R中“General settings for the analysis”一节,以及其JAGS调用中的MCMC设置)、它们在CMSY++中的默认值、cmsy_run()所用的值(除非用其settings参数更改,否则即为默认值)、每项设置的作用,以及它影响CMSY++的哪一部分。

English

This function lists the general settings of the CMSY++ code (the section “General settings for the analysis” of CMSY++16.R and the MCMC settings of its JAGS call), their default values in CMSY++, the values cmsy_run() uses (the defaults, unless changed with its settings argument), what each one does and which part of CMSY++ it affects.

用法

cmsy_defaults(settings = list(), lang = NULL)

参数

settings
可选的命名列表,给出更改后的设置,例如list(CV.C = 0.2),用于将它们与默认值并列显示并进行检查。
English Optional named list of changed settings, e.g. list(CV.C = 0.2), to show them next to the defaults and check them.
lang
description列的语言:“en”、“zh”或”both”。默认为NULL,即使用fao_settings()设置的语言。
English The language of the description column: “en”, “zh” or “both”. Default is NULL, the language set with fao_settings().

返回值

一个数据框,每项设置一行,列为setting、cmsy_default、used、changed、applies_to和description。

English

A data frame with one row per setting: setting, cmsy_default, used, changed, applies_to and description.

详细说明

代码中的两项设置sigmaR和ni在CMSY++16.R中有赋值,但代码中没有任何地方使用它们:模型的过程误差在JAGS中由先验itau2 ~ dgamma(4, 0.01)估计,因此修改sigmaR不会改变任何结果。它们标为”not used”(不使用),不能修改,以免把一次运行误当作过程误差的敏感性分析。

标为”BSM”的设置只在给出资源丰度数据(CPUE或生物量)时才起作用;FAO数据没有资源丰度数据,因此仅用FAO数据时,只有标为”all”的设置会改变结果。CMSY++的图表和输出开关(mgraphs、kobe.plot、pp.plot、retros、save.plots、write.output等)由cmsy_run()的plots参数设定,文件名则由运行过程本身设定。

English

Two settings of the code, sigmaR and ni, are set in CMSY++16.R but used nowhere in it: the process error of the model is estimated in JAGS with the prior itau2 ~ dgamma(4, 0.01), so changing sigmaR would not change any result. They are listed as “not used” and cannot be changed, so that a run is not taken for a sensitivity analysis of the process error.

Settings marked “BSM” only matter when abundance data (CPUE or biomass) are given; FAO data have none, so with FAO data alone only the settings marked “all” change the results. The chart and output switches of CMSY++ (mgraphs, kobe.plot, pp.plot, retros, save.plots, write.output, …) are set by the plots argument of cmsy_run(), and the file names by the run itself.

参考文献

Froese, R., Demirel, N., Coro, G. and Winker, H. (2021). User Guide for CMSY++. GEOMAR, Germany, 17 pp. https://oceanrep.geomar.de/id/eprint/52147/

示例

# All settings with their CMSY++ defaults
cmsy_defaults()

# Check changed settings before a run: here a larger catch error and longer chains
cmsy_defaults(list(CV.C = 0.2, n.iter = 100000, n.burnin = 50000), lang = "zh")