sim1 {qtl2pleio}R Documentation

Simulate a single multivariate data set consisting of n subjects and d phenotypes for each

Description

Simulate a single multivariate data set consisting of n subjects and d phenotypes for each

Usage

sim1(X, B, Sigma)

Arguments

X

design matrix (incorporating genotype probabilities from two loci), dn by df

B

a matrix of allele effects, f rows by d columns

Sigma

dn by dn covariance matrix

Value

a vector of length dn. The first n entries are for trait 1, the second n for trait 2, etc.

Examples

n_mouse <- 20
geno <- rbinom(n = n_mouse, size = 1, prob = 1 / 2)
X <- gemma2::stagger_mats(geno, geno)
B <- matrix(c(1, 2), ncol = 2, nrow = 1)
sim1(X, B, Sigma = diag(2 * n_mouse))

[Package qtl2pleio version 1.4.3 Index]