llmimpute 0.1.0
Initial CRAN release
New features
lmi_impute() — unified imputation entry point.
Automatically selects between the LLM engine (Anthropic Claude API) and
the offline statistical engine based on API key availability.
lmi_impute_offline() — fully self-contained imputation
using nineteen algorithms implemented in base R. No internet connection
or API key required.
lmi_diagnose() — local missingness audit: reports
missing counts, percentages, and column types without any API
calls.
lmi_set_api_key() / lmi_get_api_key() —
session-scoped API key management via options() or the
ANTHROPIC_API_KEY environment variable.
lmi_set_model() / lmi_get_model() — select
the Anthropic Claude model used for LLM imputation.
lmi_export() — write the imputed data frame and audit
trail to CSV or RDS files.
lmi_methods() — print a formatted catalogue of all
available offline imputation methods with usage guidance.
- S3 methods
print.lmi_result(),
summary.lmi_result(), and
as.data.frame.lmi_result() for the lmi_result
class.
- Nineteen offline imputation algorithms:
- Classical: mean, median, mode, LOCF, NOCB, hot-deck, PMM
- Regression: linear, Lasso (coordinate descent), Ridge (closed form),
Bayesian Ridge (evidence approximation)
- Kernel/neighbour: KNN (scaled Euclidean), SVR (RBF kernel)
- Tree/ensemble: decision tree (CART), random forest, gradient
boosting
- Iterative: MissForest
- Matrix completion: PCA imputation (iterative SVD), SoftImpute
(nuclear-norm minimisation)