There is an accessor function for each slot in the S4 class FIMSFit
, where
the function is named get_*()
and the star can be replaced with the slot
name, e.g., get_input()
. These accessor functions are the preferred way
to access objects stored in the available slots.
Usage
get_input(x)
# S4 method for class 'FIMSFit'
get_input(x)
get_report(x)
# S4 method for class 'FIMSFit'
get_report(x)
get_obj(x)
# S4 method for class 'FIMSFit'
get_obj(x)
get_opt(x)
# S4 method for class 'FIMSFit'
get_opt(x)
get_max_gradient(x)
# S4 method for class 'FIMSFit'
get_max_gradient(x)
get_sdreport(x)
# S4 method for class 'FIMSFit'
get_sdreport(x)
get_estimates(x)
# S4 method for class 'FIMSFit'
get_estimates(x)
get_fits(x)
# S4 method for class 'FIMSFit'
get_fits(x)
get_number_of_parameters(x)
# S4 method for class 'FIMSFit'
get_number_of_parameters(x)
get_timing(x)
# S4 method for class 'FIMSFit'
get_timing(x)
get_version(x)
# S4 method for class 'FIMSFit'
get_version(x)
Arguments
- x
Output returned from
fit_fims()
.
Value
get_input()
returns the list that was used to fit the FIMS model, which
is the returned object from create_default_parameters()
.
get_report()
returns the TMB report, where anything that is flagged as
reportable in the C++ code is returned.
get_obj()
returns the output from TMB::MakeADFun()
.
get_opt()
returns the output from nlminb()
, which is the minimizer used
in fit_fims()
.
get_max_gradient()
returns the maximum gradient found when optimizing the
model.
get_sdreport()
returns the list from TMB::sdreport()
.
get_estimates()
returns a tibble of parameter values and their
uncertainties from a fitted model.
get_fits()
returns a tibble of input data and corresponding
expected values, likelihoods, and additional metadata from a fitted model.
The tibble includes the following variables:
module_name: Character string that describes the name of the module, e.g.,
"Data"
.module_id: Integer that provides identifier for linking outputs.
label: Character string that describes type of data.
data_id: Not yet implemented/NA: Integer that will provide unique identifier for data.
fleet_name: Not yet implemented/NA: Character string that will provide fleet name corresponding to name provided via FIMSFrame.
unit: Not yet implemented/NA: Character string that will describe appropriate units for the data inputs and expected values.
uncertainty: Not yet implemented/NA: Character string that will describe the uncertainty specified for the data input value.
age: Not yet implemented/NA: Integer that will provide the age affiliated with a data input, where appropriate.
length: Not yet implemented/NA: Integer that will provide the length affiliated with a data input, where appropriate.
datestart: Not yet implemented/NA: Character string that will provide the start date for the data input, corresponding to the value provided in the input data.
dateend: Not yet implemented/NA: Character string that will provide the end date for the data input, corresponding to the value provided in the input data.
year: Not yet implemented/NA: Integer that will provide model year for the data input.
init: Numeric that provides the initial value for the data input.
expected: Numeric that provides the expected value for the data input. *NOTE: units for provided init and expected values need to be standardized.
log_like: Numeric that provides log-likelihood for expected value.
distribution: Character string that indicates the distribution used for the log-likelihood estimation.
re_estimated: Logical that indicates whether any random effects were estimated during model fitting. Log-likelihood values should not be directly compared between models with and without estimation of random effects.
log_like_cv: Not yet implemented/NA: Numeric that will indicate corresponding uncertainty for the log-likelihood value.
weight: Numeric that indicates data weighting applied to each data value; manually fixed at 1. *NOTE: Will need to be made responsive to user-specified or user-estimated data weighting once data weighting is added to FIMS as a feature.
get_number_of_parameters()
returns a vector of integers specifying the
number of fixed-effect parameters and the number of random-effect parameters
in the model.
get_timing()
returns the amount of time it took to run the model in
seconds as a difftime
object.
get_version()
returns the package_version
of FIMS that was used to fit
the model.