Compute matrix of simulated Z scores about expected values of 0 - ie under a null of no association at any SNP

simulated_z_null(snps, freq, nrep = 1)

Arguments

snps

The snps at which we wish to compute the expected Z Score

freq

Haplotype frequencies as a data.frame, with column Probability indicating relative frequency in controls.

nrep

Number of replicates (simulated vectors of Z scores) under this scenario. Default=1

Examples

freq=fake_freq(nhaps=100,nsnps=5) # fake haplotype frequency data Z=simulated_z_null(snps=paste0("s",1:5),freq=freq,nrep=3) Z # no causal variants
#> [,1] [,2] [,3] [,4] [,5] #> [1,] 0.09931843 -0.04157054 -0.002904959 -0.2415847 0.07008964 #> [2,] -0.44050005 0.39662109 0.707181278 0.3153451 0.16470100 #> [3,] 0.37338368 0.14259717 -0.008665311 -0.2754189 0.21626801