Description Usage Arguments Details Value
View source: R/model_selection_functions.R
Simulate data at specified parameter values for doing model selection
1 2 3 | sim.data.for.mod.selection(n.muts, coes.to.sim, sigs.to.sim, mods.to.sim,
d.true, d.range, w.wt, wts, outpath, n.reps.ea, coe.sim.model = "identical",
coe.dist.par = NA)
|
n.muts |
Number of mutations to simulate. Vector of the form |
coes.to.sim |
Coefficient values to simulate. Vector of the form |
sigs.to.sim |
Sigma values to simulate. Vector of the form |
mods.to.sim |
Models to simulate under. Vector with model names of the form c("stick", "mult", "add"). |
d.true |
True value of d. |
d.range |
Range of possible values for d. If estimate is outside this, estimate is not considered valid. |
w.wt |
Wild type fitness. |
wts |
Weights when estimating coefficients and d. |
outpath |
Full path including file name to write results |
n.reps.ea |
Number of simulated-fit datasets per parametric condition |
coe.sim.model |
Coefficient simulation model. Possible values: "identical" means all coefficients take same value– from coe.v. "uniform" indicates to sample individual coefficients from a uniform with mean given by coe.v and distributed U(coe.v-coe.dist.par, coe.v+coe.dist.parm). "normal" means sample coefficients from normal distribution with mean from coe.v and sigma given by coe.dist.par. Default = "identical". |
coe.dist.par |
Coefficient distribution parameter. If coe.sim.model=="uniform", then uniform is U(-coe.dist.par, +coe.dist.parm). If coe.sim.model=="normal", then distributed normal with mean given by coe.v and sigma give by coe.dist.parm. |
Function loops over all parametric combinations and simulates datasets. For each dataset it fits to each of the models and outputs a row of metrics that summarize the fits.
Nothing. Instead results are written to outpath
file for later analysis.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.