Package: positively 0.0.0.9000

Malcolm Barrett

positively: Diagnose Positivity Violations and Extrapolation in Causal Inference

Provides diagnostics for positivity violations and extrapolation in causal inference. Includes methods based on effective data points, positivity regression trees, hat values, highest density regions, density ratios, and parametric bootstrap bias estimates, covering binary, categorical, and continuous exposures as well as time-varying treatments. Each diagnostic returns a tidy result object and an optional plot.

Authors:Malcolm Barrett [aut, cre]

positively_0.0.0.9000.tar.gz
positively_0.0.0.9000.zip(r-4.7-any)positively_0.0.0.9000.zip(r-4.6-any)positively_0.0.0.9000.zip(r-4.5-any)
positively_0.0.0.9000.tgz(r-4.6-any)positively_0.0.0.9000.tgz(r-4.5-any)
positively_0.0.0.9000.tar.gz(r-4.7-any)positively_0.0.0.9000.tar.gz(r-4.6-any)
positively_0.0.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION
card.svg |card.png
positively/json (API)

# Install 'positively' in R:
install.packages('positively', repos = c('https://r-causal.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/r-causal/positively/issues

Pkgdown/docs site:https://r-causal.github.io

Datasets:

On CRAN:

Conda:

4.91 score 1 stars 1 packages 12 scripts 19 exports 27 dependencies

Last updated from:1720d3371d. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK407
source / vignettesOK278
linux-releaseOK385
macos-releaseOK297
macos-oldrelOK299
windows-develOK678
windows-releaseOK644
windows-oldrelOK508
wasm-releaseOK116

Exports:autoplotcheck_density_ratioscheck_edpcheck_eta_biascheck_extrapolationcheck_hat_valuescheck_hdrcheck_hdr_seqcheck_portcheck_port_seqcheck_positivityglancehdr_density_normalnew_hdr_densitypositivity_checkpositivity_diagnosticpull_plot_datasniff_violationstidy

Dependencies:causalgenericsclicpp11farvergenericsggplot2gluegtableisobandlabelinglifecyclemagrittrpillarpkgconfigpurrrR6RColorBrewerrlangrpartS7scalestibbletidyselectutf8vctrsviridisLitewithr

Getting started with positively
Setup | Running check_positivity() | Reading the container | PoRT: locating the subgroups | Effective data points: how much support surrounds each intervention | Extrapolation: distance and the convex hull | Choosing diagnostics beyond the defaults | References

Last update: 2026-09-01
Started: 2026-07-06

Positivity for continuous exposures
Setup | Effective data points: support at chosen exposure values | Shifting each observation away from the dose it received | Hat values: leverage-based extrapolation risk | Highest density region non-overlap | When each diagnostic is informative | Declaring the exposure type | Time-varying exposures | Where to go next | References

Last update: 2026-09-01
Started: 2026-07-06

Estimator-focused diagnostics
Setup | ETA.Bias: the bias an estimator incurs | A categorical exposure, term by term | A continuous exposure and its working model | Extrapolation as the g-computation view of positivity | Where to go next | References

Last update: 2026-08-16
Started: 2026-07-06

Density ratios and modified treatment policies
Setup | What the summaries measure | A hand-built point-treatment example | A mean below one signals leaked support | Time-varying treatments and cumulative products | A fitted longitudinal policy with lmtp | Inverse-probability weights from a propensity model | Where to go next | References

Last update: 2026-08-04
Started: 2026-07-06

Identifying Violations: PoRT and sPoRT
Setup | Finding subgroups with PoRT | Tuning the reading rule | Continuous exposures | Sequential violations with sPoRT | Limiting the history with lag | Censoring | Where to go next | References

Last update: 2026-08-04
Started: 2026-07-06

Readme and manuals

Help Manual

Help pageTopics
Plot a density-ratio diagnosticautoplot.density_ratios_result plot.density_ratios_result
Plot an effective-data-points diagnosticautoplot.edp_result plot.edp_result
Plot an ETA.Bias diagnosticautoplot.eta_bias_result plot.eta_bias_result
Plot an extrapolation diagnosticautoplot.extrapolation_result plot.extrapolation_result
Plot a hat-value diagnosticautoplot.hat_values_result plot.hat_values_result
Plot an HDR non-overlap diagnosticautoplot.hdr_result plot.hdr_result
Plot a PoRT subgroup diagnosticautoplot.port_result plot.port_result
Plot the diagnostics a positivity check holdsautoplot.positivity_check plot.positivity_check
Summarize density ratios for positivity diagnosischeck_density_ratios check_density_ratios.matrix check_density_ratios.numeric
Diagnose positivity with effective data pointscheck_edp
Diagnose positivity bias with the parametric bootstrap (ETA.Bias)check_eta_bias
Diagnose extrapolation for binary exposures with Gower distances and the convex hullcheck_extrapolation
Diagnose positivity for continuous exposures with hat valuescheck_hat_values
Diagnose positivity for continuous exposures with HDR non-overlapcheck_hdr
Diagnose sequential positivity for continuous exposures with HDR non-overlapcheck_hdr_seq
Locate positivity-violating subgroups with the PoRT algorithmcheck_port
Locate sequential positivity violations with the sPoRT algorithmcheck_port_seq
Diagnose positivity across the applicable methodscheck_positivity
The default normal conditional-density estimator for HDR non-overlaphdr_density_normal
Construct a conditional-density estimator for the HDR diagnosticnew_hdr_density
Binary-exposure data with planted positivity violationspos_violations
Longitudinal continuous-exposure data with a time-2 support gappos_violations_long
A container for a set of positivity diagnostics$,positively::positivity_check-method names,positively::positivity_check-method positivity_check summary,positively::positivity_check-method [[,positively::positivity_check-method
The abstract parent class for positivity diagnosticspositivity_diagnostic
Pull the data behind a plotpull_plot_data
Report what a set of diagnostics foundsniff_violations sniff_violations,positively::positivity_check-method