Skip to contents

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

Usage

# S3 method for class 'lsd'
getLBC(object, name = "LSD_mean")

Arguments

object

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

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:

`"LSD"`

A matrix of LSD values for each covariate at each `ck`.

`"LSD_mean"`

The mean absolute LSD value across all covariates.

`"LSD_max"`

The maximum absolute LSD value.

`"Z"`

Covariate matrix used.

`"Tr"`

Treatment assignment vector.

`"ck"`

Kernel center values used.

`"h"`

Bandwidth values used.

`"K"`

Number of kernel points.

`"rho"`

Span values used.

`"ate_flag"`

ATE or ATT aim for estimate.

`"kernel"`

kernel used to define local neibourhood.

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)
LSD.fit <- lsd(model)
getLBC(LSD.fit, "LSD")
getLBC(LSD.fit, c("LSD", "LSD_mean"))  # Extract multiple components
getLBC(LSD.fit, "ALL")  # Extract all components as a named list
} # }