Learn R Programming

SIMICO (version 0.2.0)

sim_gmat: 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)

Value

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

Arguments

n

Total number of observations.

q

Total number of SNPs.

rho

Common pairwise correlation parameter.

Examples

Run this code
# 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)

Run the code above in your browser using DataLab