sim.stick.data: Simulate data under stickbreaking model.

Description Usage Arguments Details Value Examples

View source: R/simulate_data_fnxs.R

Description

Simulate data under stickbreaking model.

Usage

1
sim.stick.data(n.muts, coes, sigma, d.true, w.wt, geno.matrix, sim.geno.matrix)

Arguments

n.muts

Number of mutations.

coes

Vector of stickbreaking coefficients for each mutation

sigma

Noise to add to expectations

d.true

The distance to the boundary to use in simulations (d)

w.wt

Fitness of the wildtype

geno.matrix

Specifies which genotypes to simulated.

sim.geno.matrix

If TRUE, simulate geno.matrix. If FALSE, use geno.matrix provided.

Details

Function takes coefficients (coes) and generates the expected fitness values for each genotype. This set of expected values is given in fit.matrix.exp. Then it adds normal error to them to produce the "observed" data (fit.matrix).

Value

List:
[[1]] fit.matrix is matrix with (simulated) observed data
[[2]] fit.matrix.exp is same matrix without error

Examples

1
2
3
 geno.matrix <- generate.geno.matrix(5)
 coes <- rep(0.1, 5)
 sim.stick.data(5, coes, 0.1, 1, 1, geno.matrix)

Stickbreaker documentation built on May 29, 2017, 9:01 a.m.