sim_gmat: Simulate genetic matrix.

View source: R/allFunctions.R

sim_gmatR Documentation

Simulate genetic matrix.

Description

Simulates a n x q genetic matrix with the option to specify the common pairwise correlation.

Usage

sim_gmat(n,q,rho)

Arguments

n

Total number of observations.

q

Total number of SNPs.

rho

Common pairwise correlation parameter.

Value

The result of a n x q genetic matrix of q SNPs.

Examples

# Set sample size
n = 100

# Set number of SNPs
q = 5

# Set common pairwise correlation
rho = 0.1

# Simulate genetic matrix
gMat <- sim_gmat(n, q, rho)

SIMICO documentation built on Nov. 26, 2022, 1:06 a.m.