Skip to contents

This function compares the inference results from a model to the expected values based on a ground truth dataset with the simulated effects. The function handles models with mixed effects and fixed effects separately, ensuring that the comparison is appropriate for the specific model type.

Usage

compareInferenceToExpected(tidy_tmb, ground_truth_eff, formula_used)

Arguments

tidy_tmb

A fitted model object convert to tidy dataframe.

ground_truth_eff

A ground truth dataset with the simulated effects.

formula_used

formula used in model

Value

A data frame containing the comparison results, including the term names, inference values, and expected values.

Details

If a model includes mixed effects, the function checks for support for the specific mixed effect structure and provides an informative error message if the structure is not supported.

Examples

if (FALSE) {
evalData <- compareInferenceToExpected(l_tmb, ground_truth_eff)
}