This function takes in the output from a cmdstanr$sample() function (the fit object) and a series of diagnostic tolerances and returns a dataframe containing flags for whether any of the diagnostic thresholds were exceeded, which would indicate that the model did not properly converge. This funtion has a default method that takes the CmdStan fitting object, as well as an S3 method for objects of class 'wwinference_fit'
This method overloads the generic get_model_diagnostic_flags function specifically for objects of type 'wwinference_fit'.
Usage
get_model_diagnostic_flags(x, ...)
# S3 method for class 'wwinference_fit'
get_model_diagnostic_flags(x, ...)
# Default S3 method
get_model_diagnostic_flags(
x,
ebmfi_tolerance = 0.2,
divergences_tolerance = 0.01,
frac_high_rhat_tolerance = 0.05,
rhat_tolerance = 1.05,
max_tree_depth_tol = 0.01,
...
)
Arguments
- x
Either an object of the 'wwinference_fit' class or the R6 Cmdstan Object fit object
- ...
additional arguments
- ebmfi_tolerance
float indicating the tolerance for EBMFI (estimated bayesian fraction of missing information), default is
0.2
- divergences_tolerance
float indicating the tolerance for the proportion of sampling iterations that are divergent, default is
0.01
- frac_high_rhat_tolerance
float indicating the tolerance for the proportion of parameters rhats>rhat_tolderance, default is
0.05
- rhat_tolerance
float indicating the tolerance for the rhat for individual parameters, default is
1.05
- max_tree_depth_tol
float indicating the tolerance for the proportion of iterations that exceed the maximum tree depth, default is
0.01
,
Value
flag_df: dataframe containing columns for each of the flags, if any flags are TRUE that indicates some model issue
See also
Other diagnostics:
parameter_diagnostics()
,
summary_diagnostics()
,
wwinference()