-
Notifications
You must be signed in to change notification settings - Fork 0
/
PosteriorPredictive_MCMC.Rev
24 lines (18 loc) · 1.06 KB
/
PosteriorPredictive_MCMC.Rev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
################################################################################
#
# RevBayes Example: Bayesian model testing using posterior predictive simulation
#
# authors: Lyndon M. Coghill, Sebastian Hoehna and Jeremy M. Brown
#
################################################################################
source( model_file_name )
mni = 0
monitors[++mni] = mnModel(filename="output_" + model_name + "/" + analysis_name + "_posterior.log",printgen=50, separator = TAB)
monitors[++mni] = mnFile(filename="output_" + model_name + "/" + analysis_name + "_posterior.trees",printgen=50, separator = TAB, phylogeny)
monitors[++mni] = mnScreen(printgen=1000, TL)
monitors[++mni] = mnStochasticVariable(filename="output_" + model_name + "/" + analysis_name + "_posterior.var",printgen=50, separator = TAB)
mymcmc = mcmc(mymodel, monitors, moves, nruns=1)
directory = "output_" + model_name + "/" + analysis_name + "_post_sims"
my_pps_mcmc = posteriorPredictiveAnalysis(mymcmc, directory)
#mymcmc.burnin(generations=10000,tuningInterval=10)
my_pps_mcmc.run(generations=50000)