##input model list
Models<-params$Models;
doc_type<-params$doc_type;
verbose = params$ParameterTables$verbose;

##set knitr options for subsequent chunks
knitr::opts_chunk$set(echo=FALSE, error=FALSE, message=FALSE, warning=FALSE, concordance=TRUE, fig.width=6.5, fig.height=3.5, dpi=300)

##set caption numbering
if (!exists("fig")){
  fig<-1;#figures
  tbl<-0;#tables
}

cases<-names(Models);
nCases<-length(cases);

\blandscape

Parameters

Parameters at bounds

The following tables list the parameters for each model case that ended up near the lower or upper limits set on the parameter in question. Here, the criterion for being "at" the bound is to be closer than 0.01% of the allowed range to either bound.

  message("Starting printParametersAtBounds")
  mdfr<-rCompTCMs::extractMDFR.Results.ParametersAtBounds(Models,verbose=params$ParameterTables$verbose);
  write.csv(mdfr,file="ModelParametersAtBounds.csv",row.names=FALSE);
  rCompTCMs::printResults.ParametersAtBounds(mdfr=mdfr,fontsize="tiny",verbose=params$ParameterTables$verbose);
  rm(mdfr);

\clearpage

Parameter estimates

Estimated parameter values and associated standard deviations (from the ADMB std file) are presented in the following table for the model scenarios r paste0(paste0(cases[1:(nCases-1)],collapse=", ")," and ",cases[nCases]).

  message("Starting printParamsTable")
  mdfr<-rCompTCMs::extractMDFR.Results.ParameterValues(Models,verbose=params$ParameterTables$verbose);
  write.csv(mdfr,file="ModelParameterValues.csv",row.names=FALSE);
  categories = params$ParameterTables$categories;
  if (is.null(categories)) categories = "all";
  processes = params$ParameterTables$processes;
  if (is.null(processes)) processes = "all";
  types = params$ParameterTables$types;
  if (is.null(types)) types = "all";
  param_names = params$ParameterTables$params;
  if (is.null(param_names)) param_names = "all";
  rCompTCMs::printResults.ParameterValues(mdfr=mdfr,
                                          categories=categories,
                                          processes=processes,
                                          types=types,
                                          params=param_names,
                                          fontsize="tiny",verbose=params$ParameterTables$verbose);
  rm(mdfr);

\elandscape



wStockhausen/rCompTCMs documentation built on Sept. 12, 2023, 3:13 p.m.