# NOT RUN {
ntip=30
set.seed(123)
tree=simulate_tree(epsilon = 0.01,alpha = -1,beta = 0,N = ntip,equal.ab = TRUE)
beta=maxlik.betasplit(tree,up=10)$max_lik
plot(tree)
niter=1000
# }
# NOT RUN {
chain=mcmc_alpha(tree,epsilon=0.01,beta=beta,niter=600,V = c(0.1),ini=c(0),
verbose = 100,silent = FALSE,Nadapt = 100,NadaptMin = 100)
# Continue the same chain
chain=mcmc_alpha(tree,epsilon=0.01,beta=beta,niter=400,verbose = 100,silent = FALSE,
chain = chain,Nadapt = 100,NadaptMin = 500,NadaptMax = 700)
thinned=mcmc(chain$mcmc[seq(200,1000,10),])
plot(thinned)
da=density(thinned[,"alpha"])
MPa=da$x[which.max(da$y)]
print(MPa)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab