Evaluate change in objective function and likelihood components for up to 2 parameters.
# S3 method for MSAassess
profile(fitted, p1, v1, p2, v2, cores = 1, ...)# S3 method for MSAprof
plot(
x,
component = "objective",
rel = TRUE,
xlab,
ylab,
main,
plot2d = c("contour", "filled.contour"),
...
)
The profile generic returns a data frame of the likelihood values that correspond to
fixed values of p1 and p2.
Likelihood loglike refers to maximizing the probability of the observed data (higher values for better fit)
Prior logprior refers to maximizing the probability of a parameter to their prior distribution (higher values are closer to the prior mode)
Penalty penalty are values added to the objective function when parameters exceed model bounds (lower values are better)
fn is the objective function returned by RTMB (lower values are better)
objective is the objective function returned by the optimizer (lower values are better)
The accompanying plot function returns a line plot for a 1-dimensional profile or a contour plot for a two dimensional profile. Will plot the negative log likelihood or negative log prior (better fit with lower values).
Relative values are obtained by subtracting from the fitted value. See attr(x, "fitted")
MSAassess object returned by fit_MSA()
Character string that represents the first parameter to be profiled,
including the parameter name and index of the vector/array. See "Parameters" section of make_parameters().
Additionally, this function allows users to specify R0_s and h_s (in normal units).
Vector of values corresponding to p1
Character string that represents the optional second parameter to be profiled
Vector of values corresponding to p2
Integer for the number of cores to use for parallel processing (snowfall package)
Other argument to the base graphics function, i.e., either plot() or contour()
Output from profile.MSAassess()
Character for the column in x to be plotted
Logical, whether the relative change in component is plotted (TRUE) or the raw values (FALSE)
Optional character for the x-axis label
Optional character for the y-axis label
Optional character for the plot title
Character, plotting function for two-dimensional profiling (either a contour() or filled.contour() plot)