Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# io
fp = "./"
fn = fp + "prior_timetree.txt"
# make a tree variable
n_tips = 10
for (i in 1:n_tips) { names[i] = "T"+i }
t ~ dnUniformTimeTree(originTime=1.0, taxonNames=names)
# create a vector of moves
mvi = 1
mv[mvi++] = mvNNI(t, 2.0)
mv[mvi++] = mvNarrow(t, 5.0)
mv[mvi++] = mvFNPR(t, 2.0)
mv[mvi++] = mvSubtreeScale(t, 5.0)
mv[mvi++] = mvNodeTimeSlideUniform(t, 10.0)
# create a vector of monitors
mni = 1
mn[mni++] = mnScreen(t)
mn[mni++] = mnFile(t,file=fn)
# create the model from the DAG
mdl = model(t)
# create and run MCMC
ch = mcmc(mdl, mn, mv)
ch.run(1000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment