Debian Codegraph @

examples/TestXML/TreePriors/testYuleModel.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2 <!-- $Id: testCoalescent.xml,v 1.2 2005/07/11 23:22:40 rambaut Exp $ -->
3 <!-- Tests the coalescent prior -->
4
5 <beast>
6
7 <taxa id="taxa1">
8 <taxon id="A"/>
9 <taxon id="B"/>
10 <taxon id="C"/>
11 <taxon id="D"/>
12 </taxa>
13
14 <!-- create a demographic model and intialize currentPopulationSize parameter -->
15 <constantSize id="demo1" units="years">
16 <populationSize>
17 <parameter id="demo1.pop1" value="10.0"/>
18 </populationSize>
19 </constantSize>
20
21 <!-- simulate a coalescent tree -->
22 <coalescentTree id="tree1">
23 <constantSize idref="demo1"/>
24 <taxa idref="taxa1"/>
25 </coalescentTree>
26
27
28 <!-- A prior on the distribution node heights defined given -->
29 <!-- a Yule speciation process (a pure birth process). -->
30 <yuleModel id="yule" units="substitutions">
31 <birthRate>
32 <parameter id="yule.birthRate" value="2.0" lower="0.0"
33 upper="100.0"/>
34 </birthRate>
35 </yuleModel>
36
37 <treeModel id="treeModel1">
38 <coalescentTree idref="tree1"/>
39 <rootHeight>
40 <parameter id="treeModel1.rootHeight"/>
41 </rootHeight>
42 <nodeHeights rootNode="false" internalNodes="true">
43 <parameter id="treeModel1.internalNodeHeights"/>
44 </nodeHeights>
45 <nodeHeights rootNode="true" internalNodes="true">
46 <parameter id="treeModel1.allNodeHeights"/>
47 </nodeHeights>
48 </treeModel>
49
50 <speciationLikelihood id="speciation">
51 <model>
52 <yuleModel idref="yule"/>
53 </model>
54 <speciesTree>
55 <treeModel idref="treeModel1"/>
56 </speciesTree>
57 </speciationLikelihood>
58
59 <treeLengthStatistic name="TL" id="TL">
60 <treeModel idref="treeModel1"/>
61 </treeLengthStatistic>
62
63 <mcmc id="mcmc1" chainLength="10000000">
64 <speciationLikelihood idref="speciation"/>
65 <log id="logScreen2" logEvery="100000">
66 <column dp="4">
67 <speciationLikelihood idref="speciation"/>
68 <parameter idref="treeModel1.rootHeight"/>
69 <treeLengthStatistic idref="TL"/>
70 </column>
71 </log>
72 <log id="log1" logEvery="10" fileName="yulePrior.log">
73 <speciationLikelihood idref="speciation"/>
74 <parameter idref="treeModel1.rootHeight"/>
75 <treeLengthStatistic idref="TL"/>
76 </log>
77 <logTree id="logTree1" logEvery="100" nexusFormat="true"
78 fileName="yulePrior.trees">
79 <treeModel idref="treeModel1"/>
80 </logTree>
81 <operators>
82 <subtreeSlide weight="1" gaussian="true" size="1">
83 <treeModel idref="treeModel1"/>
84 </subtreeSlide>
85 </operators>
86 </mcmc>
87
88 <report>
89 Time taken:
90 <property name="timer">
91 <mcmc idref="mcmc1"/>
92 </property>
93 </report>
94
95 <traceAnalysis fileName="yulePrior.log" burnIn="1000">
96 <!-- expectation of root height for 4 tips and lambda = 2 -->
97 <expectation name="treeModel1.rootHeight" value="0.541666"/>
98 <!-- expectation of tree length for 4 tips and lambda = 2 -->
99 <expectation name="TL" value="1.5"/>
100 </traceAnalysis>
101
102 <treeTraceAnalysis fileName="yulePrior.trees"/>
103
104 </beast>
105
106