| cc.sim {FSA} | R Documentation |
Constucts hypothetical catch-at-age data given choices for a hypothetical population (initial population size and mortality rate) and fishery (age at recruitment to the gear and proportional vulnerabilities to the gear). The natual log of catch-at-age is then plotted against age (i.e., a catch curve) and slider bars can be used to change parameter values. This function can be used to explore the effects of a parameter on the catch curve and thus elucidate the effects of assumption violations.
cc.sim(max.age=10,v=rep(1,max.age),Zycl=FALSE)
max.age |
An integer indicating the oldest age to use in the simulations. |
v |
A vector of length max.age of the proportional vulnerabilities to the gear. See details. |
Zycl |
A logical indicating whether changes in mortality rates are applied to and followed for each year-class or not. |
A slider object is created from which parameters related to the population or the fishery can be changed. Each of item is described below. The range of values allowed for each of the parameters were chosen to allow a wide variety of model values. However, it is highly likely that these ranges do not encompass every possible set of values that a user may which to view.
The ‘Z mean’ is mean mortality rate to use in the simulations. If ‘Z cv’ (see below) is set to 0 then this is the exact mortality rate used in the simulations.
The ‘Z cv’ is the coefficient of variation (as a proportion, not a percentage) to when modeling the mortality rate. If ‘Z cv’ is set to 0 then no randomization is used. If ‘Z cv’ is greater than 0 than a random normal deviate centered on ‘Z mean’ with a standard deviation of ‘Z cv’*‘Z mean’ is used to model mortality.
A change in mortality rate is simulated with the ‘Z delta’, ‘Z delta Age’, and ‘Z steady?’ sliders. The ‘Z.delta’ is a proportional adjustment in the mortality rate that begins at ‘Z delta Age’. The adjustment is a constant if ‘Z steady’ is set to 1 (=TRUE) but grows geometrically if ‘Z steady’ is set to 0 (=FALSE). For example, if ‘Z mean’ is set to 0.40, ‘Z cv’ is set to 0 (i.e., no variability), ‘Z delta’ is 1.2, ‘Z delta Age’ is 5, and ‘Z steady?’ is 1 then the vector of mortalities used for ages 1 to 10 would be
c(0.4,0.4,0.4,0.4,0.4*1.2,0.4*1.2,0.4*1.2,0.4*1.2,0.4*1.2,0.4*1.2)
Alternatively, if all values were the same except that ‘Z steady?’ was set to 0 then the vector of mortalities used for ages 1 to 10 would be
c(0.4,0.4,0.4,0.4,0.4*1.2,0.4*1.2^2,0.4*1.2^3,0.4*1.2^4,0.4*1.2^5,0.4*1.2^6)
The simulation code takes two different tracks in modeling variability in the instantaneous mortality rate. The first track considered that the mortality rate experienced throughout the existence of each year-class corresponding to ages in the cross-sectional sample older than some defined age was different than all previous year-classes. Simulations using this track can be used to assess the assumption of a constant mortality rate for all year-classes. The second track considered that the mortality rate for all ages prior to some defined age was the same for all year-classes but that a different mortality rate for all ages after some defined age for all year-classes was used. Simulations using this track can be used to assess the assumption of a constant mortality rate for all ages. Which track is used in a set of simulations is set by the Zycl= argument. If Zcyl=TRUE then the first track is used.
A set of slider bars are used to control similar aspects of the initial population size. ‘No mean’ and ‘No CV’ are the mean and coefficient of variation to be used in the simulations. Changes in the initial population size are simulated with the ‘No delta’, ‘No delta Age’, and ‘No steady?’ sliders. These adjustments are applied in the same manner as described for the instantaneous mortality rate.
The catch curve graphic is shown for as many as three lines. The gray line is the catch-at-age data for the default values (these values can be resturned to by using the Reset button). This line is used simply as a basis for examining parameter changes. The blue line is the catch-ag-age data for current choices of ‘Z.mean’, ‘Z.cv’, ‘No.mean’, ‘No.cv’, and ‘Recruitment Age’ but not for any of the other choices. In other words, the blue line reflects the model for other than default parameter choices but NO assumption violations. This line serves as a basis for different parameter choices without assumption violations. The red line is the catch-at-age data for all current choices of parameters in the slider box. The lines are plotted in the order of “gray”, “red”, “blue” so, if any two are equal then the color first plotted will not be seen.
The vulnerabilties of each age of fish to the fishing gear can be simulated in one of two ways. If a vector of “1”s is sent in the v argument (this is the default) then the fish in all ages after the recruitment age selected with a slider bar are fully and equally vulnerable to the gear. Fish in age-classes prior to the age of recruitment are modeled by a linear increase in proportional vulnerability from a value of 0.1 to 1 for the age at recruitment. A wider variety of changes in vulnerabilities can be modeled by sending various vectors of proportional vulnerabilities for each age in the simulation. For example, if 10 ages are modeled then the vector c(0.1,0.3,0.6,1,1,1,0.8,0.6,0.4,0.2) could be used to model incomplete vulnerabilities prior to age 4, complete vulnerablities from age 4 to age 6, and then incomplete vulnerabilities for age 7 and older. If the vector of vulnerabilities sent does not contain all “1”s then a recruitment age slider will not be available.
The slider object has a tendency to “disappear” when focus is put on the plot. The slider object can be brought back to the foreground by finding the object listed on the Windows toolbar. The slider object should be 'exit'ed when finished exploring a model.
None. An interactive graphic connected to slider controls is produced.
Derek H. Ogle, dogle@northland.edu
## Not run: ## These examples cannot be run by examples() but should work in an interactive R session ## Not run: cc.sim() ## Not run: cc.sim(v=c(0.1,0.3,0.6,1,1,0.8,0.7,0.6,0.5,0.4))