sim_find_num_nas: This function computes the number of NAs that should be used...

View source: R/sim_find_num_nas.R

sim_find_num_nasR Documentation

This function computes the number of NAs that should be used to replace genotypes given the size of the genotype matrix and the missing genotype rate

Description

This function computes the number of NAs that are needed to achieve a certain missing genotype rate given the size of the input genotype matrix which is num_snps rows and num_gametes columns.

Usage

sim_find_num_nas(num_gametes, num_snps, missing_genotype_rate)

Arguments

num_gametes

an integer, the number of gametes or the number of columns of the genotype matrix

num_snps

an integer, the number of snps or the number of rows of the genotype matrix

missing_genotype_rate

a numeric, < 1, the missing genotype rate

Value

num_nas an integer, the product of the missing genotype rate and the number of genotypes (num_snps * num_gametes)


mccoy-lab/rhapsodi documentation built on July 27, 2022, 3:56 a.m.