plot_profile: Plot results from MCBE parameter profile analysis

View source: R/plot_profile.R

plot_profileR Documentation

Plot results from MCBE parameter profile analysis

Description

Plot results from MCBE parameter profile analysis

Usage

plot_profile(
  sim_summary,
  nm_par = "steep",
  nm_obj = c("parms", "parm.cons"),
  like_pattern = "^lk.",
  like_groups = c("L", "D", "U", "lenc", "agec", "SR"),
  like_shift = "min_par",
  like_prop_exclude = c("lk.total", "lk.unwgt.data"),
  par_args = list(mfrow = c(2, 1), mar = c(3, 3, 0, 0), mgp = c(1, 0.3, 0), tck = -0.01),
  plot_profiles = TRUE,
  plot_stacked = TRUE
)

Arguments

sim_summary

Output object from summarize_MCBE

nm_par

Name of parameter to plot profile

nm_obj

Name of object where par should be found in sim_summary. By default, plot_profile will look in parms and parm.cons and use the first instance of nm_par it finds. It works with data frames in sim_summary like parms and is programmed to work with parm.cons as a special case, but may not work with other objects within sim_summary.

like_pattern

pattern to use to identify likelihood components from like object in sim_summary. Internally, the function uses grepl to identify names in like. The default "^lk." uses regular expression to identify all likelihood components.

like_groups

names of groups to use when plotting grouped likelihoods. The function adds "^lk." to the group names to find parameters to group in like.

like_shift

method to use to scale likelihood components for plotting: "min" shifts each likelihood component by the overall minimum, "min_par" shifts each likelihood component by its own minimum, "none" returns raw likelihoods

like_prop_exclude

Names of columns in like to exclude when computing

par_args

arguments to pass to par

plot_profiles

logical. Plot likelihood profiles as lines, possibles shifted with like_shift?

plot_stacked

logical. Plot likelihood profiles as stacked areas (ggplot)? columns not in like_prop_exclude.


nikolaifish/bamExtras documentation built on July 21, 2023, 8:26 a.m.