Description Usage Arguments Value Examples
View source: R/fit_NeutralDrift.R
fitNeutralDrift
will run an mcmc algorithm to infer the parameters from the neutral drift model.
1 2 3 4 5 6 7 8 | fitNeutralDrift(
x,
time_interval,
max_iter = 40000,
n_par_chains = 2,
burn_in = 5000,
thin = 20
)
|
x |
Clone size counts. With a column per day and a row per size clone size. |
time_interval |
vector of time point values. Should have same number of elements as columns in x. |
max_iter |
number of mcmc iterations to run. |
n_par_chains |
number of parallel chains (and cpus used) to run. |
burn_in |
mcmc burn in |
thin |
mcmc thining |
Will retrun a list that can be used directly with the plotting functions. The list contains an mcmc matrix, the data and time vector used to fit, as well as the MAP estimate of the parameters.
1 2 3 4 5 | time_points = c(4, 7, 10, 14, 21)
x = simulateNeutralDriftData(0.1, 5, 2, time_points, 8, 300)
fit_out = fitNeutralDrift(x, time_points)
plotsConvergence_Neutral(fit_out)
plotsNeutralDrift_Fit(fit_out)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.