View source: R/outcome_predict.R
outcome_predict | R Documentation |
This is the primary function for ship-strike analysis in the shipstrike
package.
outcome_predict(
traffic,
scale_factors = NULL,
whale,
seasonal = NULL,
p_encounter_dir = NULL,
surface,
avoidance,
lethality,
outcome_dir = "",
asymptote_scaling = NULL,
month_batches = list(winter = c(0:4, 11:12), summer = 5:10),
species = "fw",
year = 2019,
iterations = 1000
)
traffic |
A
|
scale_factors |
Optional. A |
whale |
Spatial grid of whale density (i.e., a density surface). This
spatial grid needs to be the same one used to summarize vessel traffic. It requires three fields:
|
seasonal |
Optional: a seasonal abundance curve used to scale the
density surface in each month. This can be useful if your density surface has the
same distribution in all months, but the overall abundance changes over time,
as with the case of fin whales in Keen et al. (2023).
This |
p_encounter_dir |
Can be left as |
surface |
The whale depth distribution,
indicating the proportion of time spent at various depths, including the surface.
An example is provided in the |
avoidance |
Model parameters for the logistic relationship between P(Collision)
and vessel speed: we provide the model parameters used in Keen et al. (2023)
as a |
lethality |
Model parameters for the logistic relationship between P(Lethality)
and vessel speed: we provide the model parameters used in Keen et al. (2023)
as a |
outcome_dir |
Path specifying the directory into which the simulator result will be saved. Default is your working directory. |
asymptote_scaling |
An option to scale asymptote of the P(Collision) curve above to
readily/cheaply explore the effects of changing collision~speed relationships on ship-strike
results. A vaue of 1 means no change in the asymptote. If the asymptote is 0.9 and |
species |
A character specifying the species (or any other label you wish to apply) to which this analysis pertains. Will be added to results in order to stave off confusion with other results from other runs. |
year |
The year pertaining to this analysis. Will be added to the results objects. |
iterations |
The number of iterations to use to produce the posterior distributions of each outcome estimate. Default is 1,000. |
The outcome of this function is two large data.frames
of results saved as
outcomes.RData
(spatially summarized results for each iteration) and
outcomes_grid.RData
(spatially explicit grid of outcomes summed across iterations)
inside outcome_dir
.
The outcomes.Rdata
table contains a row for each iteration, with the following fields:
species
= The same species
provided as an input.
year
= The same year
provided as an input.
channel
= Waterway for which outcomes are being summed across the spatial grid therein.
vessel
= Vessel type for which outcomes are being summed.
month
= Month in which outcomes are being summed.
diel
= Diel period in which outcomes are being summed.
iteration
= Iteration for which otucomes are being summed.
cooccurrence
= Number of cooccurrences predicted for this iteraiton of the channel-vessel-month-diel scenario.
encounter
= Number of close-encounter events predicted (see encounter_rate()
)
surface
= Number of strike zone events predicted, in which the strike zone is 1x vessel draft.
surface2
= Strike zone is 1.5x vessel draft.
collision1.1
= Collisions predicted, where strike zone is 1x draft and P(Collision) is a constant 0.55.
collision1.2
= P(Collision) is a function of vessel speed according to avoidance
input.
collision1.3
= Deprecated (will return same as collision1.2
)
collision1.4
= P(Collision) is 1.0 (i.e., no avoidance.)
collision2.1
= Same as above, but strike zone is 1.5x vessel draft.
collision2.2
collision2.3
collision2.4
mortality1.1
= Mortalities predicted (strike zone and P(Collision) numbers follow pattern above.)
mortality1.2
mortality1.3
mortality1.4
mortality2.1
mortality2.2
mortality2.3
mortality2.4
Pass these results on to other outcome_
functions in shipstrike
, such as outcome_table()
and
outcome_histograms()
. See the vignette for further details.
The outcomes_grid.RData
table contains a row for grid cell,
summed across all iterations, with the same fields as above except with grid_cell
instead of iteration
. Pass this result grid on to outcome_map()
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.