survatr
  1. Reference
  2. print.survatr_diag
  • Home
  • Getting started
    • Introduction
  • Estimation methods
    • IPW (Track A)
    • ICE / longitudinal (Track B)
    • Competing risks (CIF)
  • Reference
    • contrast
    • contrast.survatr_fit
    • diagnose
    • forrest
    • forrest.survatr_result
    • nhefs_surv
    • plot.survatr_result
    • print.survatr_diag
    • print.survatr_fit
    • print.survatr_result
    • surv_fit
    • tidy
    • tidy.survatr_result
  • News
  • License
  • Citation

On this page

  • Print a survatr_diag
    • Description
    • Usage
    • Arguments
    • Value
    • See Also
    • Examples

Code Links

  1. Reference
  2. print.survatr_diag

Print a survatr_diag

Description

Compact per-panel summary for the diagnostic object returned by diagnose(). Reports how many periods have positivity flags, the range of SMDs in the balance panel, IPW weight summary (if applicable), and the competing-risks identity-check result (if applicable).

Usage

## S3 method for class 'survatr_diag'
print(x, ...)

Arguments

x A survatr_diag.
… Unused.

Value

The diagnostic object, invisibly.

See Also

Other survatr_fit functions: diagnose(), print.survatr_fit(), surv_fit()

Examples

library("survatr")

set.seed(4)
n_id <- 40L; K <- 3L
pp <- data.frame(
  id = rep(seq_len(n_id), each = K),
  t  = rep(seq_len(K), times = n_id),
  A  = rep(rbinom(n_id, 1L, 0.5), each = K),
  L  = rep(rnorm(n_id), each = K),
  Y  = rbinom(n_id * K, 1L, 0.05)
)
fit <- surv_fit(pp, "Y", "A", ~L, "id", "t", time_formula = ~1)
print(diagnose(fit))
<survatr_diag>
  Positivity:  3 periods, hazards [0.0091, 0.2397]
  Balance:     1 variable(s), SMD range [-0.265, -0.177]
  Censoring:   (no censoring column supplied)