Skip to contents

Provides a structured summary of an `lbc_net` object, including loss values, balance assessments, and (if available) a treatment effect estimate with standard error and confidence interval.

Usage

# S3 method for class 'lbc_net'
summary(object, Y = NULL, type = "ATE", ...)

Arguments

object

An object of class `"lbc_net"`, generated by `lbc_net()`.

Y

(Optional) A numeric vector of observed outcomes. If the model was originally fitted with an outcome `Y` inside lbc_net and already contains a stored treatment effect (and variance), this argument is ignored and the stored results are reported. If no treatment effect is stored in `object` and `Y` is supplied, a point estimate is computed via est_effect without a variance estimate.

type

A character string specifying the treatment effect to estimate when using est_effect. Options: - `"Y"`: Computes the weighted mean outcome. - `"ATE"` (default): Computes the Average Treatment Effect. - `"ATT"`: Computes the Average Treatment Effect on the Treated. If the model already stores a treatment effect (from a call to lbc_net(..., Y = ..., estimand = ...)), the stored type is used instead of this argument.

...

Additional arguments (ignored).

Value

A list containing:

sample_info

Sample sizes and covariate counts.

losses

Training losses.

local_balance

Local standardized differences from training.

balance_table

Pre- and post-weighting global standardized differences (GSD).

treatment_effect

Estimated treatment effect and, when available, its standard error and confidence interval.

gsd

GSD after weighting.

Details

The function extracts key model components using getLBC. If the fitted object contains a stored treatment effect (e.g., from a call to lbc_net(..., Y = ..., estimand = ..., compute_variance = TRUE)), summary.lbc_net reports that estimate together with its standard error and 95% confidence interval.

If no treatment effect is stored and `Y` is supplied, est_effect is used to compute a point estimate only (no variance). If neither is available, the summary focuses on balance diagnostics.

It is designed for estimating causal effects in settings with continuous or binary outcomes. For survival outcomes, users should apply appropriate survival analysis models, such as a weighted Cox model or other time-to-event estimation methods.

See also

Examples

if (FALSE) { # \dontrun{
model <- lbc_net(data = data, formula = Tr ~ X1 + X2 + X3 + X4)
summary(model)  # Summary without treatment effect estimation
summary(model, Y = my_outcome, type = "ATE")  # Summary including treatment effect

out <- summary(model)
names(out)
out$balance_table
} # }