| Title: | Two-Sample Calibrated Imputation for Survey Data |
|---|---|
| Description: | Provides computational implementations of the Two-Sample Calibrated Imputation framework for incomplete survey data when auxiliary information is available from a separate reference sample. The package supports data preparation, survey design specification, calibration, imputation, estimation, variance estimation, diagnostics, reporting, and reproducible analytical workflows. |
| Authors: | Samuel Joel Kamun [aut, cre] |
| Maintainer: | Samuel Joel Kamun <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.0.0.9000 |
| Built: | 2026-11-09 13:49:31 UTC |
| Source: | https://github.com/kamun2026/twosamplecalimpute |
Print a tsci_data object
## S3 method for class 'tsci_data' print(x, ...)## S3 method for class 'tsci_data' print(x, ...)
x |
A |
... |
Additional arguments. |
Print a tsci_design object
## S3 method for class 'tsci_design' print(x, ...)## S3 method for class 'tsci_design' print(x, ...)
x |
A |
... |
Additional arguments. |
Performs controlled data-cleaning operations on a tsci_data
object without silently changing observed values.
tsci_clean_data(data, remove_empty_rows = FALSE, remove_empty_columns = FALSE)tsci_clean_data(data, remove_empty_rows = FALSE, remove_empty_columns = FALSE)
data |
A |
remove_empty_rows |
Logical; whether completely empty rows should be removed. |
remove_empty_columns |
Logical; whether completely empty columns should be removed. |
A cleaned tsci_data object.
Exports a tsci_data object to a CSV file.
tsci_export_data(data, file, row_names = FALSE)tsci_export_data(data, file, row_names = FALSE)
data |
A |
file |
Character path for the output CSV file. |
row_names |
Logical; whether row names should be written. |
Invisibly returns the input tsci_data object.
Imports a data set from a supported file or an existing R object
and returns it as a standardized tsci_data object.
tsci_import_data( data, sample_type = c("primary", "auxiliary"), id = NULL, variables = NULL, metadata = list() )tsci_import_data( data, sample_type = c("primary", "auxiliary"), id = NULL, variables = NULL, metadata = list() )
data |
A data frame, or a character path to a CSV file. |
sample_type |
Either |
id |
Optional character identifier variable. |
variables |
Optional character vector of variables to retain. |
metadata |
Optional list of metadata. |
A tsci_data object.
Performs the basic data-integrity checks required before Two-Sample Calibrated Imputation analysis.
tsci_validate_data( data, data_name = "data", variables = NULL, weights = NULL, key = NULL )tsci_validate_data( data, data_name = "data", variables = NULL, weights = NULL, key = NULL )
data |
A data frame to validate. |
data_name |
A character label used in validation messages. |
variables |
Optional character vector of variables to validate. |
weights |
Optional survey weights. |
key |
Optional character vector identifying records. |
A list containing validation results.