Skip to contents

Generates an anonymized, structurally identical synthetic OMOP DuckDB database file.

Usage

generate_synthetic_omop_twin(
  con,
  cohort_table,
  output_db_path,
  noise_level = 0.1,
  n_patients = NULL,
  seed = 42L
)

Arguments

con

Active DBI/DuckDB connection containing real/source OMOP data.

cohort_table

Character table name or data frame defining cohort subjects.

output_db_path

File path for the generated DuckDB database.

noise_level

Proportional Gaussian noise applied to frequencies and continuous values (default 0.10).

n_patients

Number of synthetic subjects to generate (default matches source size, min 10L).

seed

Random seed for reproducibility (default 42L).

Value

A list with counts of synthetic records created across CDM tables.