
Build a compiled likelihood context from a model
Source:R/likelihood_param_interface.R
make_context.RdCompile the model's response rules and dependencies for likelihood
evaluation. Reuse the context across candidate parameter values and datasets
for the same model. Prepare each dataset with prepare_data().
Arguments
- structure
Finalized model structure.
- diagnostics
If
TRUE, collect model compilation statistics forcomplexity_metrics().
Examples
spec <- race_spec()
spec <- add_accumulator(spec, "A", "lognormal")
spec <- add_outcome(spec, "A_win", "A")
structure <- finalize_model(spec)
make_context(structure)
#> $cpp
#> <pointer: 0x5580decf95b0>
#>
#> $outcome_labels
#> [1] "A_win"
#>
#> $observed_outcome_labels
#> [1] "A_win"
#>
#> attr(,"class")
#> [1] "accumulatr_context"