Learn R Programming

causalOT (version 1.0.2)

summary.causalWeights: Summary diagnostics for causalWeights

Description

Summary diagnostics for causalWeights

print.summary_causalWeights

plot.summary_causalWeights

Usage

# S3 method for causalWeights
summary(
  object,
  r_eff = NULL,
  penalty,
  p = 2,
  cost = NULL,
  debias = TRUE,
  online.cost = "auto",
  diameter = NULL,
  niter = 1000,
  tol = 1e-07,
  ...
)

# S3 method for summary_causalWeights print(x, ...)

# S3 method for summary_causalWeights plot(x, ...)

Value

The summary method returns an object of class "summary_causalWeights".

Arguments

object

an object of class causalWeights

r_eff

The r_eff used in the PSIS calculation. See PSIS_diag()

penalty

The penalty parameter to use

p

The power of the Lp distance to use. Overridden by argument cost.

cost

A user supplied cost function. Should take arguments x1, x2, p.

debias

Should debiased optimal transport distances be used. TRUE or FALSE

online.cost

Should the cost be calculated online? One of "auto","tensorized", or "online".

diameter

the diameter of the covariate space. Default is NULL.

niter

the number of iterations to run the optimal transport distances

tol

the tolerance for convergence for the optimal transport distances

...

Not used

x

an object of class "summary_causalWeights"

Functions

  • print(summary_causalWeights): print method

  • plot(summary_causalWeights): plot method

Examples

Run this code
if(torch::torch_is_installed()) {
n <- 2^6
p <- 6
overlap <- "high"
design <- "A"
estimand <- "ATE"

#### get simulation functions ####
original <- Hainmueller$new(n = n, p = p, 
                            design = design, overlap = overlap)
original$gen_data()
weights <- calc_weight(x = original, estimand = estimand, method = "Logistic")
s <- summary(weights)
plot(s)
}

Run the code above in your browser using DataLab