Description Usage Arguments Details Value Examples
View source: R/simulate_data_fnxs.R
Simulate data under stickbreaking model.
1 | sim.stick.data(n.muts, coes, sigma, d.true, w.wt, geno.matrix, sim.geno.matrix)
|
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. |
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).
List:
[[1]] fit.matrix is matrix with (simulated) observed data
[[2]] fit.matrix.exp is same matrix without error
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.