Summarize positivity via density ratios for LMTP fits
Source:R/margot_lmtp_positivity.R
margot_lmtp_positivity.Rd
Computes by-wave and overall summaries of density ratios, including zeros, extreme quantiles, tail mass above thresholds, and effective sample size (ESS).
Arguments
- x
Either: - the full result of `margot_lmtp()` (list with $models), - a single LMTP model fit (must have $density_ratios), - or a numeric vector/matrix of density ratios.
- thresholds
Numeric vector of tail thresholds to report (P(ratio > threshold)).
- probs
Quantiles to report (must include 0.5 if you want the median).
- ess_warn
Flag when ESS/N is below this fraction (per wave).
- zero_warn
Flag when proportion of exact zeros exceeds this fraction.
- tail_warn
Named numeric vector giving tail-mass flag thresholds (names must match thresholds). If length 1, recycled to all thresholds.
- include_overall
If TRUE, also compute an overall summary pooling all waves.
- digits
Optional integer for rounding in the returned data frames (NULL = no rounding).
- verbose
If TRUE, prints concise CLI messages when flags are raised.