Description Usage Arguments Details Examples
Structures representing a component of a GADGET likelihood file.
1 |
type |
Type of group to create. One of penalty, understocking, catchstatistics, catchdistribution, stockdistribution. |
... |
Extra parameters for the group. See details. |
The arguments you can supply will depend on the the component you are creating. All will understand the following
A descriptive name for the component
A numeric weighting
In addition, penalty
understands:
A data.frame
with 2 columns, "switch" and "power"
catchstatistics
understands:
The function Gadget should use, by default guesses based on the function that generated data
A data.frame
probably generated by mfdb_sample_meanlength_stddev
An mfdb_group
of areas, taken from attr(data, "area")
if not supplied
An mfdb_group
of ages, taken from attr(data, "age")
if not supplied
List of fleet names
List of stock names
catchdistribution
understands:
The function Gadget should use, by default uses sumofsquares
Extra parameters to supply to gadget, based on the function
TRUE or FALSE, defaults to FALSE
TRUE or FALSE, defaults to FALSE
Numeric, defaults to 10
A data.frame
probably generated by mfdb_sample_meanlength_stddev
An mfdb_group
of areas, taken from attr(data, "area")
if not supplied
An mfdb_group
of ages, taken from attr(data, "age")
if not supplied
An mfdb_group
of lengths, taken from attr(data, "length")
if not supplied
List of fleet names
List of stock names
stockdistribution
understands:
The function Gadget should use, by default uses sumofsquares
TRUE or FALSE, defaults to FALSE
Numeric, defaults to 10
A data.frame
probably generated by mfdb_sample_meanlength_stddev
An mfdb_group
of areas, taken from attr(data, "area")
if not supplied
An mfdb_group
of ages, taken from attr(data, "age")
if not supplied
An mfdb_group
of lengths, taken from attr(data, "length")
if not supplied
List of fleet names
List of stock names
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Any example could be added to a file with the following:-
## Not run:
gd <- gadget_directory('./out')
gadget_dir_write(gd, component)
## End(Not run)
# Create a penalty component
gadget_likelihood_component("penalty",
name = "bounds",
weight = "0.5",
data = data.frame(
switch = c("default"),
power = c(2),
stringsAsFactors = FALSE))
# Create an understocking component
gadget_likelihood_component("understocking", name ="understock")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.