Skip to contents

Queries the DuckDB file backing a PUMF lazy table for bootstrap weight tables created by [add_bootstrap_weights()] and returns a one-row-per-table summary tibble. Returns an empty tibble (invisibly) when no BSW tables are found.

Usage

bsw_info(tbl)

Arguments

tbl

A lazy `dplyr::tbl()` returned by [get_pumf()] or by [add_bootstrap_weights()].

Value

A tibble with columns:

`weight_col`

The weight column the BSW table was built from (matched back to the case used in the main survey table).

`bsw_table`

Name of the DuckDB table storing the weights.

`view_name`

Name of the DuckDB VIEW joining survey + BSW.

`view_exists`

Whether the companion VIEW is present.

`n_replicates`

Number of bootstrap replicate columns.

`size_mb`

Estimated table size in megabytes (from DuckDB metadata; `NA` when unavailable).

See also

[add_bootstrap_weights()], [remove_bootstrap_weights()]

Examples

if (FALSE) { # \dontrun{
sfs <- get_pumf("SFS", "2019")
sfs_bsw <- add_bootstrap_weights(sfs, weight_col = "PWEIGHT", seed = 1L)
bsw_info(sfs_bsw)
close_pumf(sfs_bsw)
} # }