Rerun_Fn: Explore counter-factual scenario

View source: R/deprecated.R

Rerun_FnR Documentation

Explore counter-factual scenario

Description

Rerun_Fn re-builds a model while fixing a subset of parameters at zero

Usage

Rerun_Fn(
  parhat0,
  turnoff_pars,
  loc_x,
  cov_to_turnoff = 1:dim(parhat0[["gamma2_ctp"]])[3],
  calculate_COG = TRUE,
  figname = NULL,
  Map = "generate",
  MapDetails_List = NULL,
  year_set = 1:ncol(parhat0[["beta1_ct"]]),
  c_set = 1:nrow(parhat0[["beta1_ct"]]),
  ...
)

Arguments

parhat0

parameter values to use by default (presumably maximum-likelihood estimates)

turnoff_pars

character-vector of parameters to turn off

loc_x

location for each knot used to calculate center-of-gravity for counter-factual runs with colnames c('E_km','N_km','Lon','Lat')

cov_to_turnoff

which covariates to turn off, as indicated by their order in TmbData$X_xtp (which only matters if "gamma1_ctp" or "gamma2_ctp" is in turnoff_pars)

calculate_COG

Boolean whether to calculate COG for each run

figname

name for figure to plot density in counter-factual scenario

Map

a tagged list of parameters to either mirror or turn off, using standard TMB interface. This input is useful, e.g., to build a model without estimating parameters, extracting Map from the list of outputs, modifying it manually, and then passing it explicitly, make_model(Map=NewMap) (OPTIONAL)

MapDetails_List

output from MapDetails_Fn

year_set

set of parameters to include

c_set

set of categories to include

...

additional arguments passed to Build_TMB_Fn

Value

Tagged list

Report

Report output for counter-factual run

NewBuild_List

Output from Build_TMB_Fn using counter-factual parameters


James-Thorson/VAST documentation built on Feb. 9, 2025, 9:05 a.m.