| 1 |
<?xml version="1.0" standalone="yes"?> |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
<beast> |
| 6 |
|
| 7 |
<parameter id="data" value="1 2 3 4 5 6 7 8 9"/> |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
<normalDistributionModel id="normalDistribution"> |
| 12 |
<mean> |
| 13 |
<parameter id="mu" value="0"/> |
| 14 |
</mean> |
| 15 |
<precision> |
| 16 |
<parameter id="tau" value="2"/> |
| 17 |
</precision> |
| 18 |
</normalDistributionModel> |
| 19 |
|
| 20 |
<distributionLikelihood id="hierarchicalModel"> |
| 21 |
<distribution> |
| 22 |
<logNormalDistributionModel idref="normalDistribution"/> |
| 23 |
</distribution> |
| 24 |
<data> |
| 25 |
<parameter idref="data"/> |
| 26 |
</data> |
| 27 |
</distributionLikelihood> |
| 28 |
|
| 29 |
<normalPrior id="normalMeanPrior" mean="0" stdev="31.62278"> |
| 30 |
<parameter idref="mu"/> |
| 31 |
</normalPrior> |
| 32 |
|
| 33 |
<logNormalPrior id="logNormalPrecisionPrior" mean="0" stdev="31.62278" meanInRealSpace="false"> |
| 34 |
<parameter idref="tau"/> |
| 35 |
</logNormalPrior> |
| 36 |
|
| 37 |
<operators id="operators"> |
| 38 |
|
| 39 |
<randomWalkOperator windowSize="0.75" weight="1"> |
| 40 |
<parameter idref="mu"/> |
| 41 |
</randomWalkOperator> |
| 42 |
|
| 43 |
<scaleOperator scaleFactor="0.75" weight="1"> |
| 44 |
<parameter idref="tau"/> |
| 45 |
</scaleOperator> |
| 46 |
|
| 47 |
</operators> |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
<parameter id="theta" value="0.0 0.0"/> |
| 52 |
|
| 53 |
<maskedParameter id="mu.es"> |
| 54 |
<parameter idref="theta"/> |
| 55 |
<mask> |
| 56 |
<parameter value="1.0 0.0"/> |
| 57 |
</mask> |
| 58 |
</maskedParameter> |
| 59 |
|
| 60 |
<transformedParameter id="tau.es" inverse="true"> |
| 61 |
<maskedParameter> |
| 62 |
<parameter idref="theta"/> |
| 63 |
<mask> |
| 64 |
<parameter value="0.0 1.0"/> |
| 65 |
</mask> |
| 66 |
</maskedParameter> |
| 67 |
<transform type="log"/> |
| 68 |
</transformedParameter> |
| 69 |
|
| 70 |
<normalDistributionModel id="normalDistribution.es"> |
| 71 |
<mean> |
| 72 |
<parameter idref="mu.es"/> |
| 73 |
</mean> |
| 74 |
<precision> |
| 75 |
<parameter idref="tau.es"/> |
| 76 |
</precision> |
| 77 |
</normalDistributionModel> |
| 78 |
|
| 79 |
<distributionLikelihood id="hierarchicalModel.es"> |
| 80 |
<distribution> |
| 81 |
<logNormalDistributionModel idref="normalDistribution.es"/> |
| 82 |
</distribution> |
| 83 |
<data> |
| 84 |
<parameter idref="data"/> |
| 85 |
</data> |
| 86 |
</distributionLikelihood> |
| 87 |
|
| 88 |
<multivariateNormalPrior id="multivariateNormalPrior"> |
| 89 |
<meanParameter> |
| 90 |
<parameter value="0.0 0.0"/> |
| 91 |
</meanParameter> |
| 92 |
<precisionParameter> |
| 93 |
<matrixParameter> |
| 94 |
<parameter value="0.001 0.0"/> |
| 95 |
<parameter value="0.0 0.001"/> |
| 96 |
</matrixParameter> |
| 97 |
</precisionParameter> |
| 98 |
<data> |
| 99 |
<parameter idref="theta"/> |
| 100 |
</data> |
| 101 |
</multivariateNormalPrior> |
| 102 |
|
| 103 |
<operators id="operators.es"> |
| 104 |
|
| 105 |
<ellipticalSliceSampler weight="1"> |
| 106 |
<parameter idref="theta"/> |
| 107 |
<multivariateNormalPrior idref="multivariateNormalPrior"/> |
| 108 |
</ellipticalSliceSampler> |
| 109 |
|
| 110 |
</operators> |
| 111 |
|
| 112 |
<mcmc id="mcmc.es" chainLength="1000000" autoOptimize="true"> |
| 113 |
<posterior> |
| 114 |
<likelihood id="likelihood.es"> |
| 115 |
<distributionLikelihood idref="hierarchicalModel.es"/> |
| 116 |
</likelihood> |
| 117 |
<prior id="prior.es"> |
| 118 |
<multivariateNormalPrior idref="multivariateNormalPrior"/> |
| 119 |
</prior> |
| 120 |
</posterior> |
| 121 |
<operators idref="operators.es"/> |
| 122 |
<log logEvery="10000"> |
| 123 |
<column label="posterior" dp="4" width="12"> |
| 124 |
<likelihood idref="likelihood.es"/> |
| 125 |
<prior idref="prior.es"/> |
| 126 |
</column> |
| 127 |
<column label="Mean" sf="6" width="12"> |
| 128 |
<parameter idref="mu.es"/> |
| 129 |
</column> |
| 130 |
<column label="Precision" sf="6" width="12"> |
| 131 |
<parameter idref="tau.es"/> |
| 132 |
</column> |
| 133 |
</log> |
| 134 |
<log logEvery="1000" fileName="testEllipticalSlice.log"> |
| 135 |
<likelihood idref="likelihood.es"/> |
| 136 |
<prior idref="prior.es"/> |
| 137 |
<parameter idref="mu.es"/> |
| 138 |
<parameter idref="tau.es"/> |
| 139 |
</log> |
| 140 |
</mcmc> |
| 141 |
|
| 142 |
|
| 143 |
<mcmc id="mcmc" chainLength="1000000" autoOptimize="true"> |
| 144 |
<posterior> |
| 145 |
<likelihood id="likelihood"> |
| 146 |
<distributionLikelihood idref="hierarchicalModel"/> |
| 147 |
</likelihood> |
| 148 |
<prior id="prior"> |
| 149 |
<normalPrior idref="normalMeanPrior"/> |
| 150 |
<gammaPrior idref="logNormalPrecisionPrior"/> |
| 151 |
</prior> |
| 152 |
</posterior> |
| 153 |
<operators idref="operators"/> |
| 154 |
<log logEvery="10000"> |
| 155 |
<column label="posterior" dp="4" width="12"> |
| 156 |
<likelihood idref="likelihood"/> |
| 157 |
<prior idref="prior"/> |
| 158 |
</column> |
| 159 |
<column label="Mean" sf="6" width="12"> |
| 160 |
<parameter idref="mu"/> |
| 161 |
</column> |
| 162 |
<column label="Precision" sf="6" width="12"> |
| 163 |
<parameter idref="tau"/> |
| 164 |
</column> |
| 165 |
</log> |
| 166 |
<log logEvery="1000" fileName="testEllipticalRandomWalk.log"> |
| 167 |
<likelihood idref="likelihood"/> |
| 168 |
<prior idref="prior"/> |
| 169 |
<parameter idref="mu"/> |
| 170 |
<parameter idref="tau"/> |
| 171 |
</log> |
| 172 |
</mcmc> |
| 173 |
|
| 174 |
<report> |
| 175 |
<property name="timer"> |
| 176 |
<object idref="mcmc"/> |
| 177 |
</property> |
| 178 |
</report> |
| 179 |
|
| 180 |
<traceAnalysis fileName="testEllipticalRandomWalk.log" stdError="true"/> |
| 181 |
<traceAnalysis fileName="testEllipticalSlice.log" stdError="true"/> |
| 182 |
|
| 183 |
</beast> |
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|