Simulated 30-taxon coalescent tree and simulated character data from a Brownian Motion intrinsic model (brownianIntrinsic), with saved generating parameters. Character data was generated under this model using doSimulation. Also includes results from an example analysis.

Format

Loading the simRunExample example dataset adds seven new objects to the namespace:

simPhyExample

A simulated 30-tip coalescent phylogeny in typical phylo format.

ancStateExample

The starting ancestral value, used for generating the simulated continuous trait data.

genRateExample

The true rate of trait change under Brownian Motion, used for generating the simulated continuous trait data.

simCharExample

The output of doSimulation on simPhyExample, under the model brownianIntrinsic. composed of just the simulated trait values as a one-column matrix with row names indicating tip labels, as desired by doRun functions.

resultsBMExample

The results of doRun_prc, under the generating model of brownianIntrinsic

resultsBoundExample

The results of doRun_prc, under the incorrect model of boundaryMinIntrinsic

The objects resultsBMExample and resultsBoundExample are lists composed of a number of elements (see the documentation for the doRun_prc function for more detail).

Examples

data(simRunExample) # ...things to do with this data? ################### # This data was generated using this process: if (FALSE) { library(TreEvo) set.seed(1) simPhyExample <- rcoal(20) # get realistic edge lengths simPhyExample$edge.length <- simPhyExample$edge.length*20 # plot with time axis (root is about ~15 Ma) plot(simPhyExample) axisPhylo() genRateExample <- c(0.001) ancStateExample <- c(10) #Simple Brownian motion simCharExample <- doSimulation( phy = simPhyExample, intrinsicFn = brownianIntrinsic, extrinsicFn = nullExtrinsic, startingValues = ancStateExample, #root state intrinsicValues = genRateExample, extrinsicValues = c(0), generation.time = 10000 ) resultsBMExample <- doRun_prc( phy = simPhyExample, traits = simCharExample, intrinsicFn = brownianIntrinsic, extrinsicFn = nullExtrinsic, startingPriorsFns = "normal", startingPriorsValues = list(c(mean(simCharExample[, 1]), sd(simCharExample[, 1]))), intrinsicPriorsFns = c("exponential"), intrinsicPriorsValues = list(10), extrinsicPriorsFns = c("fixed"), extrinsicPriorsValues = list(0), generation.time = 10000, nRuns = 2, nStepsPRC = 3, numParticles = 20, nInitialSimsPerParam = 10, jobName = "examplerun_prc", stopRule = FALSE, multicore = FALSE, verboseParticles = TRUE, coreLimit = 1 ) resultsBoundExample <- doRun_prc( phy = simPhyExample, traits = simCharExample, intrinsicFn = boundaryMinIntrinsic, extrinsicFn = nullExtrinsic, startingPriorsFns = "normal", startingPriorsValues = list(c(mean(simCharExample[, 1]), sd(simCharExample[, 1]))), intrinsicPriorsFns = c("exponential", "normal"), intrinsicPriorsValues = list(10,c(-10,1)), extrinsicPriorsFns = c("fixed"), extrinsicPriorsValues = list(0), generation.time = 10000, nRuns = 2, nStepsPRC = 3, numParticles = 20, nInitialSimsPerParam = 10, jobName = "examplerun_prc_bound", stopRule = FALSE, multicore = FALSE, verboseParticles = TRUE, coreLimit = 1 ) rm(.Random.seed) save.image(file = "simRunExample.rdata") if(interactive()){savehistory("simRunExample.Rhistory")} }