Package: WFC 2.0.1

Kunxiang Ma

WFC: Workflow-Oriented Survey Weight Calibration

Provides a disciplined precheck, execution, and diagnostics workflow for survey weighting and raking. Weight construction requires design-only data, a verified external target, outcome-blind planning, and human approval before weight locking, with bilingual reports for decision and statistical audiences. Converts calibrated and replicate weights into standard survey designs, provides optional broom-style result projections, and records serializable production pipeline provenance. Supports fixed, predeclared soft calibration tolerances and categorical entropy balancing from verified margins, plus panel attrition weighting, high-influence unit diagnostics, Fay's balanced repeated replication, and opt-in parallel execution for long runs. Calibration methods follow Deville and Saerndal (1992) <doi:10.1080/01621459.1992.10475217>, and entropy balancing follows Hainmueller (2012) <doi:10.1093/pan/mpr025>.

Authors:Kunxiang Ma [aut, cre], WEIAN DATA TECH Co., Ltd. [cph, fnd]

WFC_2.0.1.tar.gz
WFC_2.0.1.zip(r-4.7-any)WFC_2.0.1.zip(r-4.6-any)WFC_2.0.1.zip(r-4.5-any)
WFC_2.0.1.tgz(r-4.6-any)WFC_2.0.1.tgz(r-4.5-any)
WFC_2.0.1.tar.gz(r-4.7-any)WFC_2.0.1.tar.gz(r-4.6-any)
WFC_2.0.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
WFC/json (API)

# Install 'WFC' in R:
install.packages('WFC', repos = c('https://weiandata.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/weiandata/wfc/issues

Datasets:

On CRAN:

Conda:

5.18 score 3 scripts 320 downloads 42 exports 1 dependencies

Last updated from:2e14ffb988. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK146
source / vignettesOK154
linux-releaseOK121
macos-releaseOK138
macos-oldrelOK107
windows-develOK102
windows-releaseOK104
windows-oldrelOK103
wasm-releaseOK104

Exports:as_svrepdesignas_svydesignwf_apply_collapsewf_approve_planwf_assess_impactwf_attach_weightswf_attritionwf_audit_exportwf_auto_trimwf_autoweighwf_blendwf_calibratewf_collapse_ladderwf_composewf_diagnosewf_dimswf_execute_planwf_guided_executewf_guided_planwf_import_referencewf_import_targetwf_influencewf_pipelinewf_plan_cellswf_plan_poststratwf_plan_weightswf_poststratwf_precheckwf_prepare_designwf_propensitywf_rakewf_replicateswf_reportwf_runwf_suggest_collapsewf_suggest_ladderwf_target_populationwf_target_propensitywf_target_referencewf_target_templatewf_validatewf_variance

Dependencies:digest

Attrition and influence after a verified design

Last update: 2026-07-15
Started: 2026-07-11

Dirty data and safe infeasibility handling

Last update: 2026-07-15
Started: 2026-07-11

Guided verified weighting in WFC 2.0

Last update: 2026-07-15
Started: 2026-07-11

Importing external targets with evidence

Last update: 2026-07-15
Started: 2026-07-11

Precheck, verified execution, and diagnosis

Last update: 2026-07-15
Started: 2026-07-11

Review tools for verified weighting

Last update: 2026-07-15
Started: 2026-07-11

Using locked WFC weights with survey tools

Last update: 2026-07-15
Started: 2026-07-11

Verified calibration methods in WFC 2.0
Fixed-tolerance soft calibration | Categorical entropy balancing | Bounded logit calibration

Last update: 2026-07-15
Started: 2026-07-11

Verified production pipelines in WFC 2.0

Last update: 2026-07-15
Started: 2026-07-11

Verified, outcome-blind weighting in WFC 2.0
Start with design-only and analysis data | Import a target with its own evidence record | Plan without calculating weights | Keep approval separate from execution | Attach outcomes only after locking | Agent contract

Last update: 2026-07-15
Started: 2026-07-15

Readme and manuals

Help Manual

Help pageTopics
Convert WFC replicate weights to a survey replicate designas_svrepdesign
Convert WFC weights to a survey designas_svydesign
Convert a weighting quality report to a data frameas.data.frame.wf_quality_report
Coerce a variance result to a data frameas.data.frame.wf_variance_result
Plot an automatic trim frontierplot.wf_auto_trim
Plot blend lambda sensitivityplot.wf_blend_result
Plot weight diagnosticsplot.wf_diagnostics
Plot propensity overlap and covariate balanceplot.wf_propensity_weights
Plot calibrated weight distributionsplot.wf_weights
Print attrition weightsprint.wf_attrition_weights
Print an automatic trim recommendationprint.wf_auto_trim
Print a guided weighting resultprint.wf_autoweigh_result
Print a blend result.print.wf_blend_result
Print an outcome-blind cell merge planprint.wf_cell_merge_plan
Print a collapse planprint.wf_collapse_plan
Print outcome-free survey design dataprint.wf_design_data
Print diagnosticsprint.wf_diagnostics
Print post-lock outcome impactprint.wf_impact
Print influence diagnosticsprint.wf_influence
Print a collapse-ladder draftprint.wf_ladder_draft
Print a pipeline specificationprint.wf_pipeline
Print a post-stratification planprint.wf_poststrat_plan
Print a precheck resultprint.wf_precheck
Print a weighting quality reportprint.wf_quality_report
Print replicate weightsprint.wf_replicate_weights
Print a weight-validation resultprint.wf_validation
Print a variance resultprint.wf_variance_result
Print a reviewable weight planprint.wf_weight_plan
Print calibrated weightsprint.wf_weights
Summarize a post-stratification plansummary.wf_poststrat_plan
Apply a category collapse planwf_apply_collapse
Record a human attestation for a reviewed weight planwf_approve_plan
Assess descriptive outcome impact after weights are lockedwf_assess_impact
Attach locked weights to analysis data by exact unit IDwf_attach_weights
Estimate panel attrition weightswf_attrition
Export a self-contained WFC audit filewf_audit_export
Recommend a weight-trimming capwf_auto_trim
Run a guided workflow from verified design and target objectswf_autoweigh
Blend online and offline calibrated estimateswf_blend
Calibrate weights from verified design and target objectswf_calibrate
Declare a post-stratification collapse ladderwf_collapse_ladder
Compose multiple weighting stageswf_compose
Diagnose calibrated weightswf_diagnose
Declare calibration dimensionswf_dims
Execute an approved plan and lock its weightswf_execute_plan
Execute a guided workflow with an external human approvalwf_guided_execute
Prepare a guided safe weighting workflowwf_guided_plan
Import a verified external reference-sample targetwf_import_reference
Import a verified external population targetwf_import_target
Diagnose high-influence calibrated unitswf_influence
Declare a production weighting pipelinewf_pipeline
Plan deterministic, outcome-blind support-cell mergingwf_plan_cells
Plan post-stratification cell resolutionwf_plan_poststrat
Build a reviewable outcome-blind weight planwf_plan_weights
Post-stratify verified design data to a verified joint targetwf_poststrat
Precheck sample and target compatibilitywf_precheck
Prepare outcome-free survey design datawf_prepare_design
Correct a non-probability sample by inverse-propensity pseudo-weighting.wf_propensity
Rake verified design data to a verified external targetwf_rake
Generate re-calibrated replicate weights for variance estimation.wf_replicates
Build a weighting quality reportwf_report
Run a production weighting pipelinewf_run
Suggest collapse plans from precheck findingswf_suggest_collapse
Draft a post-stratification collapse ladderwf_suggest_ladder
Target from external population datawf_target_population
Build a propensity target: stacked reference frame and membership model spec.wf_target_propensity
Target from a weighted reference samplewf_target_reference
Create a safe external-target import templatewf_target_template
Compare calibrated weights against a reference releasewf_validate
Combine replicate weights and an estimator into a variance and CI.wf_variance
Simulated survey weighting example datawfc_example
Broom-style projections for WFC resultsaugment.wf_weights glance.wf_blend_result glance.wf_diagnostics glance.wf_variance_result glance.wf_weights tidy.wf_blend_result tidy.wf_diagnostics tidy.wf_variance_result tidy.wf_weights wfc-tidiers