change_lcomp_constant: Set the robustification constant for length composition data.

Description Usage Arguments Details Value Which arguments to specifiy in case files Author(s)

View source: R/change_lcomp_constant.R


This function replaces the robustification value for length composition data in a .dat file that was read in using SS_readdat with those specified in lcomp_constant. It then writes a new file with name dat_file_out into the working directory. If used with run_ss3sim the case file should be named lcomp_constant. A suggested case letter is C.


change_lcomp_constant(lcomp_constant, dat_list, dat_file_out,
  write_file = TRUE)



*The new value to be used. Must be a numeric value, as a proportion. For example 0.1 means 10 percent. See the SS3 manual for further information. A NULL value indicates no action resulting in using the current value, and a value of 0 will throw an error since that leads to an error when zeroes exist in the data. Instead use a very small value like 1e-07.


An SS data list object as read in from SS_readdat in the r4ss package. Make sure you select option section=2.


A string providing the path to the output SS3 .dat file.


Should the data file be written to disk?


The robustification constant is added to both the observed and expected proportions of length composition data, before being normalized internally. It is designed to help stabilize the model, but is unclear how and when to use it for optimal effect. The same value is used for all length data.


A modified SS3 .dat file, and that file returned invisibly (for testing) as a vector of character lines.

Which arguments to specifiy in case files

All function argument descriptions that start with an asterisk (*) will be passed through the case files to run_ss3sim. If one of these arguments is not specified in a case file, then a value of NULL will be passed, which may or may not be an appropriate value. Other arguments will be ignored if specified.


Cole Monnahan

ss3sim documentation built on May 30, 2017, 6:41 a.m.