This is the template object for an R6 brms model class.
It contains functions for summarising and visualising the model results.
Public fields
dataset_name(
character)
Identifies the dataset used.last_update(
character)
Identifies the most recent update to the object (YYYY-MM-DD).data(
data.frame)
The data used in model fitting.model(
brmsfit)
The brms model object.extra_args(
list())
Identifies addition arguments supplied during model fitting (found in '...' when callinghib_fit_brms).fixedef_coefficients(
data.frame)
The fixed effects coefficients.metrics(
list)
List containing model performance metrics.processing_flags(
list())
Identifies the processing steps used for the HibDatabase object that was used for model fitting.site_locations(
data.frame)
Contains columns for "SSBS", "Longitude" ,"Latitude"
Methods
HibModelBRMS$new()
Creates a new instance of this R6 class. Note, this object is constructed via the hib_fit_brms function found within this package.
Usage
HibModelBRMS$new(
db_obj,
mod_df,
brms_obj,
fixef_df,
metr_ls,
n_spp,
n_taxa,
n_sites,
extra_args
)Arguments
db_obj(
HibDatabase, orlist)
The HibDatabase object/s used to fit the model.mod_df(
data.frame)
The data.frame of the data used in model fitting.brms_obj(
brmsfit)
The brms model object.fixef_df(
data.frame)
The fixed effects from the fitted model.metr_ls(
list)
The list of model performance metrics.n_spp(
integerorlist)
Number of species contributing to the fitted model.n_taxa(
integerorlist)
Number of orignal taxa names contributing to the fitted model.n_sites(
integerorlist)
Number of sites contributing to the fitted model.extra_args(
list)
Additional arguments specified during model fitting.@return (
HibModelBRMS)
HibModelBRMS$plot()
Function to generate figures summarising the model.
Arguments
type(
character()) Options are: "fixed-effects", "random-effects", "map-sites".