Skip to contents

Retrieves specific components from an `lbc_net` object. This function provides a structured way to access key results, ensuring users retrieve the correct model components.

Usage

# S3 method for class 'lbc_net'
getLBC(object, name = "fitted.values")

Arguments

object

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

name

A character vector specifying the name(s) of the component(s) to extract. If name = "ALL", a named list of all available components will be returned. Available options include:

"fitted.values"

Estimated propensity scores.

"weights"

Inverse probability weights (IPW).

"loss"

The final total loss value.

"lsd_train"

A list containing key local standardized mean difference (LSD) values recorded during training:

  • lsd_max – Maximum local standardized mean difference observed during training.

  • lsd_mean – Mean local standardized mean difference observed during training.

The complete LSD profile can be computed using the function lsd().

"parameters"

Model hyperparameters such as hidden_dim, L, vae_lr, lr, weight_decay, balance_lambda, epsilon.

"stopping_criteria"

Stopping parameters including lsd_threshold, rolling_window, and max_epochs.

"seed"

Random seed used for reproducibility.

"call"

The matched function call.

"formula"

Formula used (if applicable).

"Z"

Covariate matrix used.

"Tr"

Treatment assignment vector.

"ck"

Kernel center values used.

"h"

Bandwidth values used.

"K"

Number of kernel points.

"rho"

Span parameter used to construct bandwidths.

"ate_flag"

ATE or ATT flag used in the loss.

"kernel"

Kernel used to define local neighbourhoods.

"ps_logistic"

Propensity scores fitted via logistic regression.

"estimand"

Target estimand such as ATE, ATT, or Y.

"effect"

Estimated causal effect (if computed).

"se"

Estimated standard error (if computed).

"ci"

Confidence interval for the estimated effect.

Value

The requested component(s) from the `lbc_net` object. Default returns "fitted.values". If multiple names are provided or if `name = "ALL"`, a named list of components is returned.

Examples

if (FALSE) { # \dontrun{
model <- lbc_net(data = data, formula = Tr ~ X1 + X2 + X3 + X4)
getLBC(model, "fitted.values")  # Extract propensity scores
getLBC(model, c("fitted.values", "weights"))  # Extract multiple components
getLBC(model, "ALL")  # Extract all components as a named list
} # }