---
title: "Using locked WFC weights with survey tools"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Using locked WFC weights with survey tools}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")
```

Create and lock weights through the verified workflow before converting them
to another survey-analysis representation.

```{r conversion, eval=FALSE}
analysis_ready <- wf_attach_weights(
  analysis_data,
  locked,
  id = "person_id",
  weight_name = ".weight"
)

design_survey <- as_svydesign(
  locked,
  analysis_ready,
  id = "person_id"
)
```

Replicate weights can be created from an approved refit design and converted
with `as_svrepdesign()`. Keep target identities, refit settings, seeds, and
variance assumptions in the audit record.

Interoperability does not relax WFC's input boundary. Do not use a downstream
tool to recreate a removed target behavior and then present the result as a WFC
verified run.
