rand_data: Generate random data for test purposes

Description Usage Arguments Value Examples

Description

Generates a random marker-matrix in -1,0,1 coding and a phenotype vector. Both objects are independent and the only purpose is to test functions and show examples

Usage

1
rand_data(n,p_marker,h2=0.3,prop_qtl=0.01,seed=NULL)

Arguments

n

Number of oberservations

p_marker

Number of markers

h2

Heritability of the trait

prop_qtl

Proportion of QTL of total number of markers

seed

Seed for RNG

Value

No return value. Generates two objects globally (M and y) that can be used after the execution of the function. M is the marker matrix and y the phenotype vector

Examples

1
2
3
4
5
6
# Generate random data with 100 observations and 500 markers
rand_data(100,500)

# check that objects have been created
str(M)
str(y)

cgenpp documentation built on May 2, 2019, 5:56 p.m.

Related to rand_data in cgenpp...