Description Usage Arguments Details Value See Also Examples
View source: R/model_fitting_functions.R
Fit all models using fit.models
. Used as a wrapper to combine outputs from estimate.d.MLE
, estimate.d.RDB
, estimate.d.sequential
, fit.stick.model.given.d
, fit.mult.model
, fit.add.model
, and summarize.fits.for.posterior.calc
.
1 | fit.models(data, d.range, d.adj.max = 1.1, wts = c(2, 1))
|
data |
(Required). A list containing fitness values for allele combinations.
See examples in |
d.range |
(Required). Range of realistic fitness changes from WT. "d" is the difference between maximal fitness and WT fitness. For example, WT fitness for the virus phix174 is about 20, but values up to about 25 have been observed, so d.range was set to: d.range <- c(0.1,10). |
d.adj.max |
(Optional). Default 1.1. When the estimation of d fails in
|
wts |
(Optional). Default c(2,1). |
Function is a wrapper that fits the data to all three models. First, it estimates $d$ and, using this estimate, fits the stickbreaking model. Then it fits the multiplicative and additive models.
List:
[[1]] fit.smry
contains the R^2 and P values for all models
coefficients
[[2]] fit.stick
contains stickbreaking model details like the intercept, slope, and predicted fitness values for the given allele combinations.
[[2]] fit.mult
contains multiplicative model details like the intercept, slope, and predicted fitness values for the given allele combinations.
[[2]] fit.stick
contains additive model details like the intercept, slope, and predicted fitness values for the given allele combinations.
estimate.d.MLE
, estimate.d.RDB
, estimate.d.sequential
, fit.stick.model.given.d
, fit.mult.model
, fit.add.model
, summarize.fits.for.posterior.calc
, estimate.d.MLE
, estimate.d.RDB
, estimate.d.sequential
1 | fit.models(Chou.data, d.range=c(0.1, 10), d.adj.max=1.1, wts=c(2,1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.