Skip to contents

This is a generic function used to extract components from different object types. The function dispatches the appropriate method based on the class of `object`, ensuring users can retrieve key model outputs from supported objects such as `"lbc_net"` and `lsd`.

Usage

getLBC(object, name)

Arguments

object

An object from which to extract components.

name

The name(s) of the component(s) to extract.

Value

The requested component(s), based on the specific method for the object's class.

Details

This function uses S3 method dispatching to call the appropriate method based on the object type. For example: If `object` is of class `"lbc_net"` or `"lsd"`, see getLBC.lbc_net and getLBC.lsd for details. Additional object types may be supported in the future.

Examples

if (FALSE) { # \dontrun{
fit <- lbc_net(data = my_data, formula = Tr ~ X1 + X2)
getLBC(fit, "fitted.values")  # Extract propensity scores
} # }