Learn R Programming

MSEtool (version 1.1.0)

profile_likelihood: Profile likelihood of assessment models

Description

Profile the likelihood for leading parameters of assessment models.

Usage

profile_likelihood(Assessment, figure = TRUE, save_figure = TRUE,
  save_dir = tempdir(), ...)

Arguments

Assessment

An S4 object of class '>Assessment.

figure

Indicates whether a figure will be plotted.

save_figure

Indicates whether figures will be saved to directory.

save_dir

The directory to which figures will be saved. By default: getwd()

...

A sequence of values of the parameter(s) for the profile. See details for name of arguments to be passed on.

Value

A data frame of negative log-likelihood values from the profile and, optionally, a figure of the likelihood surface.

Details

For the following assessment models, the required sequence of values are:

  • DD_TMB and DD_SS: R0 and h

  • SP and SP_SS: UMSY and MSY

  • SCA: R0 and h

  • SCA2: meanR

Examples

Run this code
# NOT RUN {
output <- DD_TMB(Data = DLMtool::Red_snapper)
pro <- profile_likelihood(output, R0 = seq(0.75, 1.25, 0.025), h = seq(0.9, 0.99, 0.01),
save_figure = FALSE)

# Ensure your grid is of proper resolution. A grid that is too coarse will distort the shape of
# the likelihood surface.
# }

Run the code above in your browser using DataLab