sample.traits: sample traits from multivariate normal distribution with one...

View source: R/sample_traits.R

sample.traitsR Documentation

sample traits from multivariate normal distribution with one trait fixed

Description

sample traits from multivariate normal distribution with one trait fixed

Usage

sample.traits(tr.levels, fix.dim, sigma, n = 10)

Arguments

tr.levels

vector: levels for fixed trait

fix.dim

scalar: dimension to fix

sigma

matrix: trait correlations

n

scalar: number of samples for each trait level, defaults to 10

Value

traits correlating as specified in sigma, with dimension fix.dim fixed to tr.levels

Examples

sample.traits(seq(-2,2,1), fix.dim=2, sigma=diag(3), n=100)

susanne-frick/MFCblockInfo documentation built on Oct. 20, 2024, 8:26 p.m.