# NOT RUN {
# toy-example (MCMC iterations not enough)
library('beast') # load package
data("FungalGrowthDataset") # load dataset
myIndex <- c(392, 62, 3, 117) # run the sampler only for the
# specific subset of time-series
set.seed(1)
# Run MCMC sampler with very small number of iterations (nIter):
run_mcmc <- beast(myDataList = FungalGrowthDataset, subsetIndex = myIndex,
zeroNormalization = TRUE, nIter = 40, burn = 20)
# Print output:
print(run_mcmc)
# Plot output to file: "beast_plot.pdf"
plot(run_mcmc, fileName = "beast_plot_toy.pdf", timeScale=1/6, xlab = "hours", ylab = "growth")
# Run the following commands to obtain convergence:
# }
# NOT RUN {
# This example illustrates the package using a subset of four
# time-series of the fungal dataset.
library('beast') # load package
data("FungalGrowthDataset") # load dataset
myIndex <- c(392, 62, 3, 117) # run the sampler only for the
# specific subset of time-series
set.seed(1) # optional
# Run MCMC sampler with the default number of iterations (nIter =70000):
run_mcmc <- beast(myDataList = FungalGrowthDataset, subsetIndex = myIndex,
zeroNormalization = TRUE)
# Print output:
print(run_mcmc)
# Plot output to file: "beast_plot.pdf"
plot(run_mcmc, fileName = "beast_plot.pdf", timeScale=1/6, xlab = "hours", ylab = "growth")
# NOTE 1: for a complete analysis remove the `subsetIndex = myIndex` argument.
# NOTE 2: `zeroNormalization = TRUE` is an optional argument that forces all
# time-series to start from zero. It is not supposed to be used
# for other applications.
# }
Run the code above in your browser using DataLab