Extract Components from an lbc_net_surv Object
getLBC.lbc_net_surv.RdRetrieves specific components from an "lbc_net_surv" object.
This function provides a structured way to access key results for
survival outcomes, ensuring users retrieve the correct model components.
Usage
# S3 method for class 'lbc_net_surv'
getLBC(object, name = "fitted.values")Arguments
- object
An object of class
"lbc_net_surv", generated bylbc_net_surv.- name
A character vector specifying the name(s) of the component(s) to extract. If
name = "ALL", the entire object (as a named list) will be returned.Available options include:
"fitted.values"Estimated propensity scores.
"weights"Inverse probability weights (IPW) calculated as \(1 / (A \hat e(X) + (1-A)\{1-\hat e(X)\})\).
"loss"Final total training loss value from LBC-Net.
"lsd_train"A list containing key local standardized mean difference (LSD) values recorded during training:
lsd_max– Maximum LSD at the final epoch.lsd_mean– Mean LSD at the final epoch.
Note: the full local balance profile can be recomputed using
lsdfor further evaluation."parameters"Model hyperparameters including (typically)
hidden_dim,num_hidden_layers,vae_lr,lr,weight_decay,balance_lambda,epsilon."stopping_criteria"Stopping parameters including
lsd_threshold,rolling_window, andmax_epochs."seed"Random seed used for reproducibility.
"call"The matched function call for reference.
"formula"Formula used (if applicable).
"Z"Covariate matrix used.
"Tr"Treatment assignment vector.
"time"Event or censoring times used in the survival analysis.
"delta"Event indicator (1 = event, 0 = censored).
"ck"Kernel center values used.
"h"Bandwidth values used.
"K"Number of kernel points.
"rho"Span value used to construct bandwidths.
"kernel"Kernel used to define local neighbourhood.
"ps_logistic"Propensity scores fitted via logistic regression.
"survival"A list containing survival-related outputs, e.g., evaluation times, survival curves
S1,S0, survival differences, variances, and confidence intervals.
Value
The requested component(s) from the "lbc_net_surv" object.
If a single name is provided, the corresponding component is returned directly.
If multiple names are provided, a named list is returned.
If name = "ALL", the full object is returned.
Examples
if (FALSE) { # \dontrun{
fit_surv <- lbc_net_surv(
data = dat,
formula = Tr ~ X1 + X2,
time = "time",
delta = "delta"
)
getLBC(fit_surv, "survival") # Extract survival curves and differences
getLBC(fit_surv, c("fitted.values", "weights")) # PS and weights
} # }