karim: Karim's Simulated Data

Description Usage Format Details Examples

Description

A simulated dataset with a kinship matrix

Usage

1

Format

A list with 6 elements:

b

vector of length 1000 representing the true regression coefficients. 10 non-zero coefficients, the rest are 0.

kin1

the true kinship matrix

s.g

polygenic variance, set to be 1.26

s.e

error variance, set to be 1

h.tot

the total trait heritability. Set to be 60 of genotypes of dimension 600 x 1000 SNPs, with approximately 800 common and 200 rare SNPs

Details

If you simulate data using the scenario provided in the example, then the QTL heritability of y will be 8 of the trait’s total heritability), and the trait total heritability is set to be 60

Examples

1
2
3
4
5
6
data(karim)
# Simulate a response using the genotype matrix and the kinship matrix
Phi <- 2 * karim$kin1
intercept <- 1
P <- MASS::mvrnorm(1, rep(0,600), karim$s.g * Phi)
y <- intercept + karim$G %*% karim$b + P + rnorm(600,0,karim$s.e)

ggmix documentation built on April 13, 2021, 9:06 a.m.