Simulate genotype data for case-control studies
simulate_synthetic_genotype.RdThis function simulates genotype data (SNPs) for a specified number of individuals, partitioned into control and case groups. It randomly selects a set of associated SNPs that affect the phenotype and applies a random genetic model.
Usage
simulate_synthetic_genotype(
n_snps,
n_individuals,
n_causal_snps,
maf_min = 0.01,
maf_max = 0.5
)Arguments
- n_snps
Integer. Total number of SNPs to simulate.
- n_individuals
Integer. Total number of individuals (must be even; half will be controls, half cases).
- n_causal_snps
Integer. Number of SNPs associated with the phenotype.
- maf_min
Numeric. Minimum minor allele frequency (default is 0.01).
- maf_max
Numeric. Maximum minor allele frequency (default is 0.5).