Restore LMTP Output from Saved Checkpoints
Source:R/margot_lmtp_restore_checkpoints.R
margot_lmtp_restore_checkpoints.Rd
Loads the checkpoint files produced by `margot_lmtp()` and rebuilds the downstream contrasts and evaluation tables so the returned object mimics a successful call to `margot_lmtp()`. This is useful when a long-running batch completed all model fits but failed before combining results.
Arguments
- checkpoint_dir
Path to the directory that contains the `.qs` checkpoint files saved by `margot_lmtp()` (e.g., `.../checkpoints/prefix_YYYYMMDD_HHMMSS`).
- outcome_vars
Optional character vector giving the desired ordering of outcomes. When omitted, the order is inferred from the checkpoints.
- contrast_type
Type of contrasts to compute: `"pairwise"` or `"null"`. Defaults to `"pairwise"`.
- contrast_scale
Scale for contrasts: `"additive"`, `"rr"`, or `"or"`. Defaults to `"additive"`, matching the default used in `margot_lmtp()`.
- quiet
Logical; if `TRUE`, suppresses CLI messages. Defaults to `FALSE`.