Bayesian Analysis Users Guide
G. Larry Bretthorst Biomedical MR Laboratory Washington University School Of Medicine, Campus Box 8227 Room 2313, East Bldg., 4525 Scott Ave. St. Louis MO 63110 http://bayes.wustl.edu Email: larry@bayes.wustl.edu October 27, 2003
2
Contents
1 An 1.1 1.2 1.3 Introduction to Bayesian Probability Theory The Rules of Probability Theory . . . . . . . . . . . . . . . . . . . . Assigning Probabilities . . . . . . . . . . . . . . . . . . . . . . . . . . Example: Parameter Estimation . . . . . . . . . . . . . . . . . . . . 1.3.1 Define The Problem . . . . . . . . . . . . . . . . . . . . . . . The Discrete Fourier Transform . . . . . . . . . . . . . . . . . Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.2 State The Model—Single-Frequency Estimation . . . . . . . . 1.3.3 Apply Probability Theory . . . . . . . . . . . . . . . . . . . . 1.3.4 Assign The Probabilities . . . . . . . . . . . . . . . . . . . . . 1.3.5 Evaluate The Sums and Integrals . . . . . . . . . . . . . . . . 1.3.6 How Probability Generalizes The Discrete Fourier Transform 1.3.7 Aliasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.8 Parameter Estimates . . . . . . . . . . . . . . . . . . . . . . . 1.4 Summary and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . 13 13 16 23 24 24 26 28 29 31 34 37 40 46 50 51 51 52 55 56 63 65 67 74 77 81 81 82 83
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
2 An Overview Of The Interface 2.1 Accessing the Packages . . . . . . . . . . . . . . . 2.2 The Package Interface—Common Characteristics 2.2.1 The Housekeeping Widgets . . . . . . . . 2.2.2 The Data Loading Widgets . . . . . . . . 2.2.3 Setting Up The Analysis . . . . . . . . . . 2.2.4 Running The Analysis . . . . . . . . . . . 2.2.5 Viewing The Output . . . . . . . . . . . . 2.2.6 The Model FID and Interface . . . . . . . The View Model FID Interface . . . . . . 2.2.7 The Package Specific Widgets . . . . . . . 2.3 The Bayesian Calculations . . . . . . . . . . . . . 2.3.1 Markov Chain Monte Carlo . . . . . . . . 2.3.2 Simulated Annealing . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
3
4 3 Bayes Analyze 3.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . 3.2 A General Overview . . . . . . . . . . . . . . . . . . . . . 3.3 The Model Equation . . . . . . . . . . . . . . . . . . . . . 3.4 The Interface To Bayes Analyze . . . . . . . . . . . . . . . The Signal Setup . . . . . . . . . . . . . . . . . . . The Resonance Model Setup . . . . . . . . . . . . 3.5 The Interface to Bayes Model . . . . . . . . . . . . . . . . 3.6 The Output Files . . . . . . . . . . . . . . . . . . . . . . . 3.6.1 The Status Display . . . . . . . . . . . . . . . . . . 3.6.2 The “bayes.status” File . . . . . . . . . . . . . . . 3.6.3 The “bayes.params.nnnn” and “bayes.model.nnnn” The Bayes Analyze File Header . . . . . . . . . . . The Global Parameters . . . . . . . . . . . . . . . The Model Components . . . . . . . . . . . . . . . The “bayes.model.nnnn” File . . . . . . . . . . . . 3.6.4 The “bayes.log.nnnn” File . . . . . . . . . . . . . . 3.6.5 The “bayes.output.nnnn” File . . . . . . . . . . . . 3.6.6 The “bayes.summary1.nnnn” File . . . . . . . . . . 3.6.7 The “bayes.summary2.nnnn” File . . . . . . . . . . 3.6.8 The “bayes.summary3.nnnn” File . . . . . . . . . . 3.6.9 The “bayes.probabilities.nnnn” File . . . . . . . . 87 88 94 96 100 100 102 105 106 107 110 111 111 115 116 117 117 121 125 126 127 128
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
4 Big Peak/Little Peak 133 4.1 The Bayesian Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 4.2 Using The Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 5 Metabolic Analysis 5.1 The Metabolic Model . . . . . . . . . . . . . 5.2 The Bayesian Calculation . . . . . . . . . . . 5.3 Using The Package . . . . . . . . . . . . . . . 5.4 The Metabolite Models . . . . . . . . . . . . 5.4.1 The IPGD D2O Metabolite . . . . . . 5.4.2 The Glutamate.2.0 Metabolite . . . . 5.4.3 The Glutamate.3.0 Metabolite . . . . 5.5 The Example Metabolite . . . . . . . . . . . . 5.5.1 The test Metabolites . . . . . . . . . . 5.6 Building The Example Metabolite . . . . . . 5.6.1 Entering The Metabolic Parameters . Enter The Metabolite Name . . . . . . Select The Metabolite Type . . . . . . Entering The Metabolite Parameters . Enter The Derived Parameter Names 5.6.2 Entering A Resonance Model . . . . . Entering the J Coupling Constants . . Entering The Resonance Parameters . 145 145 148 151 154 155 158 162 163 163 163 165 165 165 165 167 168 168 170
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
5 5.6.3 The Metabolite Subroutine . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Model Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
5.7
6 Build Your Own Resonance Model 177 6.1 Using The Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 6.2 Model Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 7 Exponentials, The Given Model 181 7.1 The Bayesian Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 7.2 Using The Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 8 Exponentials, The Unknown Model 187 8.1 The Bayesian Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 8.2 Using The Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 9 Diffusion 195 9.1 The Bayesian Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 9.2 Using The Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 10 Contact Time 203 10.1 The Bayesian Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 10.2 Using The Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 11 Big z-Magnetization Transfer 209 11.1 The Bayesian Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 11.2 Using The Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 12 z-Magnetization Transfer 215 12.1 The Bayesian Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 12.2 Using The Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 13 z-Magnetization Transfer Kinetics 225 13.1 The Bayesian Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 13.2 Using The Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 14 Polynomials of Given Order 235 14.1 The Bayesian Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 14.2 Using The Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 15 Polynomials of Unknown Order 239 15.1 The Bayesian Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 15.2 Using The Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 16 Errors In Variables 245 16.1 The Bayesian Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 16.2 Using The Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
6 17 Behrens-Fisher 17.1 The Bayesian Calculation . . . . . . . . . . . . . . . . . . . 17.1.1 The Four Model Selection Probabilities . . . . . . . The Means And Variances Are The Same . . . . . . The Mean Are The Same And The Variances Differ The Means Differ And The Variances Are The Same The Means And Variances Differ . . . . . . . . . . . 17.1.2 The Derived Probabilities . . . . . . . . . . . . . . . 17.1.3 Parameter Estimation . . . . . . . . . . . . . . . . . 17.2 The Behrens-Fisher Program . . . . . . . . . . . . . . . . . 17.3 Using The Package . . . . . . . . . . . . . . . . . . . . . . . 253 253 254 255 257 258 259 261 261 262 265 271 271 273 278 297 299 305 309
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
18 Build Your Own ASCII Model 18.1 The Bayesian Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.2 Using The Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18.3 Model Comparison Using Enter Ascii . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Implementing Remote Hosts A Bayes Analyze Error Messages Bibliography Index
List of Figures
1.1 1.2 1.3 1.4 1.5 1.6 1.7 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 2.11 2.12 2.13 2.14 2.15 2.16 2.17 2.18 2.19 2.20 3.1 3.2 3.3 3.4 3.5 3.6 A Uniformly Sampled Exponentially Decaying Sinusoid . . . . . . . . . . . . . The Log10 P (f |DI) At Frequencies Greater Than fN c . . . . . . . . . . . . . . A Nonuniformly Nonsimultaneously Sampled Exponentially Decaying Sinusoid The Log10 P (f |DI) At Intervals Of 1 MHz . . . . . . . . . . . . . . . . . . . . . Which Is The Critical Time: ∆T Or ∆TM ? . . . . . . . . . . . . . . . . . . . . How Nonuniform Sampling Destroys Aliases . . . . . . . . . . . . . . . . . . . . Estimating The Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Bayesian Analysis Dispatching Window . . . . . . The Contact Time Dispatching Button Help Message . The Sums of Exponentials Analysis Startup Message . The Sums of Exponentials Analysis Interface . . . . . The VnmrJ Data Loading Widgets . . . . . . . . . . . The z-Magnetization Interface . . . . . . . . . . . . . . Viewing The Output . . . . . . . . . . . . . . . . . . . The Parameters Report . . . . . . . . . . . . . . . . . The Probabilities Report . . . . . . . . . . . . . . . . . The Accepted Report . . . . . . . . . . . . . . . . . . The Marginal Posterior Probabilities . . . . . . . . . . The Residual Plot . . . . . . . . . . . . . . . . . . . . A Scatter Plot . . . . . . . . . . . . . . . . . . . . . . The Expected Log Likelihood Plot . . . . . . . . . . . The Log Probability by Repeat . . . . . . . . . . . . . The Model Interface Window . . . . . . . . . . . . . . The Overlay Display . . . . . . . . . . . . . . . . . . . The Vertical Display . . . . . . . . . . . . . . . . . . . The Stacked Display . . . . . . . . . . . . . . . . . . . The Horizontal Display . . . . . . . . . . . . . . . . . The The The The The The Ethyl Ether Spectrum . . . . . Bayes Analyze Tcl/dg Window Bayes Analyze VnmrJ Windows Bayes Model Tcl/dg Window . Full Ethyl Ether Spectrum . . . Overlay Display . . . . . . . . . . . . . . . . . . . . . 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 27 41 42 43 45 47 52 53 53 54 57 62 68 69 69 70 71 72 73 74 75 76 78 79 79 80 89 89 90 91 92 93
8 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 3.15 3.16 3.17 3.18 3.19 3.20 3.21 3.22 3.23 3.24 3.25 4.1 4.2 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.10 5.11 6.1 6.2 7.1 7.2 7.3 8.1 8.2 8.3 9.1 The Overlay Display Using A Triplet The Status Display . . . . . . . . . . The “bayes.status.nnnn” File . . . . The Bayes Analyze File Header . . . The Noise File . . . . . . . . . . . . The Global Parameters . . . . . . . The Model Components . . . . . . . The bayes.model.nnnn File . . . . . Uncorrelated Phase Amplitudes . . . The “bayes.log.nnnn” File . . . . . . The Initial Model . . . . . . . . . . . Signal Detection . . . . . . . . . . . The Output Report . . . . . . . . . Uncorrelated Output . . . . . . . . . The Summary Report Header . . . . The Summary2 Report . . . . . . . . The Regions/Summary3 Report . . . The Integral Reset Points . . . . . . The “bayes.probabilities.nnnn” File . And Quartet Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 108 110 112 113 116 117 118 118 119 121 122 123 124 126 127 128 129 130
The Big Peak/Little Peak Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 Example Peak/Little Peak FID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Defining The Terms . . . . . . . . . . . . . . . . . . . . . . . . . The Bayes Metabolite Window . . . . . . . . . . . . . . . . . . . Labeling of Hepatic Glucose from 2 H2 O . . . . . . . . . . . . . . Example Spectra For The IPGD D2O Metabolite . . . . . . . . . The Fraction Of Glucose From Glycogenolysis, Glycerol And The Carbon 13 Spectra For The Glutamate Metabolite . . . . . . . . Estimating The Fc0 , y and Fa0 Parameters . . . . . . . . . . . . Example Metabolite . . . . . . . . . . . . . . . . . . . . . . . . . Edit Metabolite Parameters Window . . . . . . . . . . . . . . . . Edit Resonance Parameters Window . . . . . . . . . . . . . . . . The Glutamate.2.0 Metabolite Subroutine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Krebs Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 153 155 156 157 159 162 164 166 169 174
Build Your Own Resonance Model Interface . . . . . . . . . . . . . . . . . . . . . . . 178 Model Selection Using Your Resonance Models . . . . . . . . . . . . . . . . . . . . . 180 Sums Of Exponentials Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 The BayesExpGiven.mcmc.values File . . . . . . . . . . . . . . . . . . . . . . . . . . 185 Model Selection Using The Given Model . . . . . . . . . . . . . . . . . . . . . . . . . 186 The Uknown Number of Exponentials Interface . . . . . . . . . . . . . . . . . . . . . 188 The Distribution of Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 The BayesExpUnknown.mcmc.values File . . . . . . . . . . . . . . . . . . . . . . . . 193 The Interface To The Diffusion Package . . . . . . . . . . . . . . . . . . . . . . . . . 196
9 10.1 Bayes Contact Time Analysis Interface . . . . . . . . . . . . . . . . . . . . . . . . . . 204 10.2 Simulated Contact Time Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 11.1 11.2 11.3 11.4 The Big z-Magnetization Interface . . . Big z-Magnetization Exchange Spectrum Big z-Magnetization Exchange Spectra . Big z-Magnetization Exchange Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 212 213 214
12.1 The z-Magnetization Transfer Interface . . . . . . . . . . . . . . . . . . . . . . . . . . 216 12.2 Magnetization Transfer Spectra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 12.3 Magnetization Transfer Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 13.1 The z-Magnetization Transfer Kinetics Interface . . . . . . . . . . . . . . . . . . . . . 226 13.2 The z-Magnetization Transfer Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 13.3 The Viscosity Table Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 14.1 The Polynomial Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 15.1 The Interface to Polynomials Of Unknown Order . . . . . . . . . . . . . . . . . . . . 240 15.2 The Distribution Of Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 16.1 The Errors in Variables Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 16.2 Sample Output From: ErrInVar not given.dat . . . . . . . . . . . . . . . . . . . . . . 252 17.1 17.2 17.3 17.4 17.5 17.6 17.7 18.1 18.2 18.3 18.4 The The The The The The The Hypotheses Addressed . . . . . . . . . . . . Number Of Simulations In Each Model . . . Various Calculations . . . . . . . . . . . . . Preamble Of The BayesBF.mcmc.values File Model Independent Estimates . . . . . . . . Model dependent Estimates . . . . . . . . . Behrens-Fisher Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 264 265 266 267 268 269 272 276 277 278
The Build Your Own ASCII Model Interface . Fortran Model Function . . . . . . . . . . . . . C Model Function . . . . . . . . . . . . . . . . Probabilities List form the Enter Ascii Package
21.1 The Bayes.Remote.Queue.File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
10
List of Tables
3.1 3.2 3.3 5.1 Pascal’s Triangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 The Model Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 The Short Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 The Arguments Passed To The Metabolite Subroutine . . . . . . . . . . . . . . . . . 175
11
270
Chapter 18
Build Your Own ASCII Model
The Bayes Enter ASCII package allows you to enter a model of your own and then use Bayesian probability theory to analyze that model.1 The interface to this package is shown in Fig. 18.1. To use this package you must load an ASCII data set using the standard data manipulation widgets shown in Fig. 18.1. After loading the data you must either load or build a model function, run the analysis and then view the results using the standard widgets shown in Fig. 18.1. The Build you own ASCII model has a number of unique buttons and we will have more to say about these later in Section 18.2. Before we discuss those widgets, we will first discuss the Bayesian calculations being done.
18.1
The Bayesian Calculation
The calculation done by Bayes Enter ASCII is a parameter estimation calculation. The data are modeled as d(ti ) = U (ti , a1 , a2 , . . .) + error (18.1) where d(ti ) represents the data at time ti , U (ti , a1 , a2 , . . .) is the model function, ax are the various parameters appearing in the model, and “error” represents noise in the data. To compute the marginal posterior probability for each parameter, a Markov chain Monte Carlo simulation using simulated annealing is run. The Markov chain Monte Carlo targets the joint posterior probability for all of the parameters, P (a1 a2 . . . |DI). The joint posterior probability for the parameters is factored using Bayes’ theorem to obtain P (a1 a2 . . . |DI) ∝ dσP (a1 a2 . . . σ|I)P (D|a1 a2 . . . σI) (18.2)
where the joint prior probability for the parameters, P (a1 a2 . . . σ|I), is factored into independent prior probabilities for each parameter:
m
P (a1 a2 . . . σ|I) = P (σ|I)
j=1
P (aj |I)
(18.3)
1 I would like to build a system library of predefined models. If you have models that you think would be of general use, I would like to hear from you. To have one of your models included, I would need the source code, the parameter file, a brief description of the model equations and data requirements as a “pdf” file.
271
272
THE BAYESIAN ANALYSIS PACKAGE
Figure 18.1: The Build Your Own ASCII Model Interface
Fig. 18.1 The upper panel is the VnmrJ interface to the build you own ASCII model package, while the lower panel is the Vnmr interface. This package allows you to load or build you own model that is to be analyzed using Bayesian probability theory. To do this you must create a subroutine in either fortran or C using this interface. For more on this and how to use this package, see the text for details.
BUILD YOUR OWN ASCII MODEL
273
where m is the total number of parameters in the model. The priors, P (aj |I), are assigned as either Gaussians or uniform prior probabilities using input from the interface. A Jeffreys’ prior, 1/σ, was assigned for the standard deviation of the noise prior probability. Finally, the likelihood, or direct probability, P (D|a1 a2 . . . σI), was assigned using a Gaussian of standard deviation σ. Collecting the prior probabilities, and evaluating the integral over the standard deviation of the noise prior probability, one obtains
m
P (a1 a2 . . . |DI) ∝
j=1
P (aj |I)
N
j=1
2 {d(ti ) − U (ti , a1 , a2 , . . .)}
− N 2
(18.4)
as the joint posterior probability for the parameters. The function U (ti , a1 , a2 , . . .), the names of the parameters, and the prior probabilities are all input by the user. The joint posterior probability for the parameters, P (a1 , a2 , . . . |DI), is computed using both simulated annealing and Markov chain Monte Carlo. From the samples obtained from the Markov chain, the marginal posterior probability for each of the parameters is computed. Outputs from the simulation are viewed using the standard plotting widgets. For a description of these widgets activate the help button and then activate the widget you need help on.
18.2
Using The Package
In general terms one uses this package in two different ways, by loading a pre-defined model or by entering a new model. Loading a pre-defined model is almost trivial, one simply activates the Load PreDefined Model button shown in Fig. 18.1. This button will bring up a files menu that displays the contents of the “Bayes.Enter.Ascii” directory located in your “vnmrsys” directory. To load a model, simply highlight the fortran or “C” function you wish to load and activate the load button. The macros that process the load button will create a link to the appropriate executable, set the prior probabilities, and note the program as “Built.” You can then modify the prior probabilities before to running the analysis. To build a new model requires a few more steps and the remainder of this Section will be concerned with describing the steps needed to accomplish this. The program that runs this analysis is using a Markov chain with simulated annealing. The Metropolis-Hasting algorithm used simply cycles over each parameter changing them randomly one at a time using a Gaussian proposal. After a parameter is changed, the joint posterior probability for the parameters, Eq.(18.4), is evaluated. To evaluate this probability the sum inside the square brackets must be evaluated. To do this the function U (ti , a1 , a2 , . . .) must be evaluated at each time ti . To make this evaluation, the program calls a function named “model.” The model function must evaluate U (t, a1 , a2 , . . .) AT time ti . That is to say it must return a single number U (ti , a1 , a2 , . . .), which is used in the sum. In order for the program to generate a set of parameters, a1 , . . ., am , the program must know the prior probability for these parameters. In addition the program outputs a histogram and it prints the mean and standard deviation estimate for each parameter. To facilitate identifying parameters in the outputs and to simplify programming, a name and prior probability must be specified for each parameter. These names are used to describe the parameters in the various outputs, and they are used as the parameter names in the model function itself. For example, in FORTRAN if the
274 parameters are named “T1” and “MZ” you might enter
THE BAYESIAN ANALYSIS PACKAGE
MODEL = MZ*EXP(-T/T1)
(18.5)
as the model equation. Note the use of the actual name of the parameter in the source code. To make this work the macros that process the enter ASCII package must modify the source code on the fly. The macros that do this look for certain headers within the source code and they will fail if these headers are modified. Here is the steps needed to enter a new model. First enter the names and prior probability for the parameters. Enter all of the parameters you think you need, but don’t worry about getting too many or too few parameters. If you are wrong, you can add or delete parameters later. To enter a parameter, simply enter the name of the parameter in the Name entry box. Enter the prior probability in the Low, Mean, High and Sd entry boxes. If you are going to use a uniform prior probability, then only the low and high range information are required. Next check the box to indicate if the prior probability is to be a Gaussian or a Uniform prior probability. Finally, in some models it is necessary to force set of parameters to be ordered. For example, if you were building a resonance model having two frequencies that are close to one another, then unless you order the frequencies low to high, there is no way to determine which frequency belongs to which model component. To force the program to order the parameters, check the Order check box. To enter an additional parameter, activate Add Param button. Continue entering and modifying the parameters until you have defined all of them. Next edit the model function by activating the Create New Model button. You will be prompted for the name of the model. This name must end in “.f” or “.c”. The macros won’t let you use the “.f” extension if they cannot locate a Fortran compiler in your path. However, all system running VNMR have access to “C” because GCC ships with VNMR. After you enter the name, a text edit window will be displayed that contains a “prototype” model function. About half way down in this model function is a line that says to enter you model here. To enter the model, simply replace this line with one that says model = U(t,a1,a2,....) where U (t, a1, a2, ...) is any valid Fortran or “C” code. We have made it out like this must be a simple function but this is not the case. The function, U (t, a1, a2, . . .), may be composed of any valid Fortran or “C” code. It may span many lines of source code and subroutines and function calls are permitted. These functions and subroutines must be placed at the end of the model function. Read the comments in the code to determine where you may make modifications and where you may not. Additionally, if you need to make variable definitions, there are places noted at the top of the model function where this may be done. However, make sure you insert your changes only in the places noted in the comments. If you make changes any place else, the macros that edit this function will delete your changes. After you complete entering you model function, save the model function and exit the editor. Compile the model and, finally, run the analysis. Here is a more complete description of these steps needed to create a model: 1. Entering the parameters. To enter the parameters enter the name and prior probability into the appropriate boxes, see Fig. 18.1. To add another parameter activate Add Param. To delete a parameter activate the Delete Param. Finally, to navigate between the parameters activate the Next Param button. This button cycles from one parameter to the next. When a parameter is displayed you may change its name, and prior probability, if desired.
BUILD YOUR OWN ASCII MODEL
275
When entering the prior probability, make certain that you enter reasonable values, missing by 5 orders of magnitude is not reasonable; and very likely will cause the program to not converge correctly. When the simulations start, the initial values for the parameters are sampled from these priors. Additionally, when the Markov chain simulations begin running, the annealing parameter starts at zero, consequently in this phase of the simulations the Markov chain is sampling the prior probabilities. So it is important to have the priors cover the region of parameter space that is most strongly supported by the data. Of course you will not know the exact values, but take you best guess and run the program. If the priors are too tight or do not cover the proper region of parameter space you will be able to tell by looking at the histograms. If the histograms reflect the prior probabilities, then your priors are probably inappropriate. 2. Activate the Create New Model to create a new model, see Fig. 18.1. When this button is activated you will be prompted to enter the name of the file you wish to create. If you enter a name that ends in “.f” you will get a fortran prototype model function, Fig. 18.2. Similarly, if you enter a model name that ends in “.c” you will get a “c” prototype model function, Fig. 18.3. Note that in Fig. 18.3 I have coded the exponential model shown earlier. If you examine this prototype you will find the variable names at the top of the file. The macros that generate the prototype model function insert these names in the appropriate place. To do this the macros look for the comment lines shown in the Fig. 18.2 and Fig. 18.3, if these comments are not present or have been modified in any way, the macros will not work correctly and you will have to start over. About three fourths of the way down you will find a line that says “your model function goes here.” Enter your model function at that point in the program using the names you entered on the interface as the names of the variables. After you complete entering the model function, save the file and exit the editor. Until you exit the editor, VNMR will not respond to any action you take. Note that you may include subroutines, loops and any other valid code in the appropriate places. However, you must include all of the code, except standard library routines, in a single source file. This requirement relates to the fact that the code must be compiled using special options that permit parallelization and the creation of a dynamic load library. 3. Rather than entering a new model you may want to modify the model you are currently working on. For example, you may have made a typo and the model function did not compile correctly and you need to fix the error. To do this activate the Edit Model button. When this button is activated the model function is updated with the parameter names and then the model function is displayed in a text edit window. Make any changes you need to your model and save the function. 4. Activate the Build Executable button. This button will activate the appropriate compiler, either GCC or f77, and create a dynamic load library that contains your function. Note that if there is a compile error, the error messages are displayed and you must fix these errors before you can proceed. 5. Run the analysis using the Run ASCII Analysis button. This button will write out the parameter, and then call the BayesEnterASCII program. This program will in turn read the parameter file, your data file, and finally call your subroutine many thousands of times in the process of running the analysis
276
THE BAYESIAN ANALYSIS PACKAGE
Figure 18.2: Fortran Model Function
FUNCTION IMPLICIT REAL*8 REAL*8 INTEGER REAL*8 REAL*8 REAL*8 C C!*# C#!* MODEL(T,NO_PARAMS,PARAMS) NONE MODEL TIME NO_PARAMS PARAMS(NO_PARAMS) T1 MZ
Do not change anything above this line! Enter any parameter declarations following this line ! Do not delete this line Enter any parameter declarations before this line ! Do not delete this line T1 MZ = PARAMS(1) = PARAMS(2) ! You must not change this ! You must not change this
C C C C C C C C*&^
You may enter any valid FORTRAN code between the indicated lines, including loops, functions, subroutine calls, etc. provided all of the FORTRAN source code is in this one file. Remember this is a function so the last thing you must do is equate the name of the of this function (model) to the value you wish to return. Refer to the parameters by their names Compute the function evaluated at time "t" Enter your function below this line model = YOUR MODEL GOES HERE ! Do not delete this line
C^*&
Enter your function above this line RETURN END
! Do not delete this line
! Place all functions and subroutines below here
Fig. 18.2. Note the presence of the various comments. These comments are meant to both direct and to warn you about where your modifications must go. The warning lines that tell you not to modify them mean just that, any modification—no matter how small—will cause the macros not to work correctly. To enter a model replace “YOUR MODEL GOES HERE” with your model function. For those of you not familiar with Fortran, Fortran is not case sensitive so you may intermix lower and upper case letters and it will not affect the compile.
BUILD YOUR OWN ASCII MODEL
277
Figure 18.3: C Model Function
#include double model_(double *test, int *no_params, double *params) { double model_; double model; double t; double T!; double MZ; /* Do not change anything above this line! */ /* Enter any parameter declarations following this line, do not delete this line!*/ /* Enter any parameter declarations before this line, do not delete this line! */ t = test; T1 = params[0]; MZ = params[1]; /* /* /* /* /* /* You must not change this */ /* You must not change this */ /* You must not change this */ */ */ */ */ */ */ */ */
You may enter any valid C code between the indicated lines, including loops, functions, subroutine calls, etc. provided all of the C source code is in this one file. Remember this is a function so the last thing you must do to return the value of the function (model) to the calling routine.
/* Refer to the parameters by their names /* Compute the function evaluated at time "t" /* Enter your function below this line, do not delete this line! model = MZ*EXP(-t/T1); /* Enter your function above this line, do not delete this line! return(model); /* Place all functions and subroutines below here */ }
*/
Fig. 18.3. To use a Fortran model you must have a Fortran compiler, a cost item on Sun systems; however, VNMR ships with GCC. Consequently, even if you don’t have Fortran, you may still use this package by using a C model function. As noted in the text do not modify any of the comments in this code. These comments are used by the macros that generate this code. Any modifications, no matter how small, may cause the macros to fail. In this example I have coded the exponential model function given in the text. Note the use of the parameter names, and the current time is named “t”. For those of you not familiar with “C” variables are case sensitive, so you must use the names as shown in the text.
278
THE BAYESIAN ANALYSIS PACKAGE
Figure 18.4: Probabilities List form the Enter Ascii Package Model Name redor1.f redor2.f Log(e) Prob 5.93606E-01 -9.27482E+00 Probability 0.99995 0.00005 Date/Time Run Thu Dec 20 10:16:19 2001 Thu Dec 20 10:17:22 2001
Fig. 18.4. The probabilities list shows the name of the model function, the base e logarithm of the posterior probability for the model, the normalized probability and the date and time each model was run.
Models that you have entered are saved in the “vnmrsys/Bayes.Predefined.Ascii” directory and may be reused at any time. To load a predefined model simply activate the Load Predefined Model button, see Fig. 18.1. This button will bring up a modified copy of the files menu and on this menu you should highlight the “.f” or “.c” model you which to load and then activate the load button. The macros that process the load button will then create a link to the appropriate dynamic load library, set the model status to “Built” (assuming the library existed), and load the prior probabilities. Thus you will be able to accumulate and save models for later use. You will also find that changing between different models is very fast and easy.
18.3
Model Comparison Using Enter Ascii
You can use the Enter Ascii package to do model comparison. When the numerical simulation runs, during the simulated annealing phase the enter ASCII program computes the posterior probability the model. This posterior provability is written to the “Bayes.prob.model” file located in the experiment. If you load a second, third, etc. model and run them, the posterior probability for each model is written to the “Bayes.prob.model” file. When you activate the Prob Lst button the “Bayes.prob.model” file is displayed in the text window of VNMR. An example of this file is shown in Fig. 18.4 This listing contains the name of the model, for the Enter Ascii package that’s the name of the model function, the natural logarithm of the posterior probability for the model, the normalized posterior probability of the models shown, and the date and time each model was run. In the case of this simple model comparison the “redor1.f” model was preferred to the “redor2.f” model.
304
THE BAYESIAN ANALYSIS PACKAGE
Bibliography
[1] Jaynes, E. T., “Probability Theory—The Logic of Science,” in press, Cambridge University Press, Cambridge, 2002. [2] Tribus, M., Rational Descriptions, Decisions and Designs, Pergamon Press, Oxford, 1969. [3] Zellner, A., An Introduction to Bayesian Inference in Econometrics, John Wiley and Sons, New York, 1971. [4] Loredo, T. J., “From Laplace To SN 1987A: Bayesian Inference In Astrophysics,” in Maximum Entropy and Bayesian Methods, P. F. Fougere (ed), Kluwer Academic Publishers, Dordrecht, The Netherlands, 1990. [5] Jaynes, E. T., “How Does the Brain do Plausible Reasoning?” unpublished Stanford University Microwave Laboratory Report No. 421 (1957); reprinted in Maximum-Entropy and Bayesian Methods in Science and Engineering 1, pp. 1-24, G. J. Erickson and C. R. Smith Eds., 1988. [6] Bretthorst, G. Larry, “An Introduction to Parameter Estimation Using Bayesian Probability Theory,” in Maximum Entropy and Bayesian Methods, Dartmouth College 1989, P. Foug`re e ed., Kluwer Academic Publishers, Dordrecht the Netherlands, 1990. [7] Jeffreys, Harold Sir, Theory of Probability, Oxford Univ. Press, London, 1939 Later editions, 1948, 1961. [8] Bayes, Rev. T., “An Essay Toward Solving a Problem in the Doctrine of Chances,” Philos. Trans. R. Soc. London 53, pp. 370-418 (1763); reprinted in Biometrika 45, pp. 293-315 (1958), and Facsimiles of Two Papers by Bayes, with commentary by W. Edwards Deming, New York, Hafner, 1963. [9] Laplace, P. S., A Philosophical Essay on Probabilities, unabridged and unaltered reprint of Truscott and Emory translation, Dover Publications, Inc., New York, 1951, original publication date 1814. [10] Jaynes, E. T., “Prior Probabilities,” IEEE Transactions on Systems Science and Cybernetics, SSC-4, pp. 227-241 (1968); reprinted in [36]. [11] Jaynes, E. T., “Marginalization and Prior Probabilities,” in Bayesian Analysis in Econometrics and Statistics, A. Zellner, ed., North-Holland Publishing Company, Amsterdam, 1980; reprinted in [36]. 305
306
THE BAYESIAN ANALYSIS PACKAGE
[12] Jaynes, E. T., “Where Do We Stand On Maximum Entropy?” in The Maximum Entropy Formalism, R. D. Levine and M. Tribus Eds., pp. 15-118, Cambridge: MIT Press, 1978; Reprinted in [36]. [13] Shore J. E., R. W. Johnson, IEEE Trans. on Information Theory, IT-26, No. 1, pp. 26-37, 1981. [14] Shore J. E., R. W. Johnson, IEEE Trans. on Information Theory, IT-27, No. 4, pp. 472-482, 1980. [15] Shannon, C. E., “A Mathematical Theory of Communication,” Bell Syst. Tech. J. 27, pp. 379423 (1948). [16] Bretthorst, G. Larry (1999), “The Near-Irrelevance of Sampling Frequency Distributions,” in Maximum Entropy and Bayesian Methods, W. von der Linden et al. (eds.), pp. 21-46, Kluwer Academic Publishers, the Netherlands. [17] Lomb, N. R. (1976) “Least-Squares Frequency Analysis of Unevenly Spaced Data,” Astrophysical and Space Science, 39, pp. 447-462. [18] Scargle, J. D. (1982) “Studies in Astronomical Time Series Analysis II. Statistical Aspects of Spectral Analysis of Unevenly Sampled Data,” Astrophysical Journal, 263, pp. 835-853. [19] Scargle, J. D. (1989) “Studies in Astronomical Time Series Analysis. III. Fourier Transforms, Autocorrelation and Cross-correlation Functions of Unevenly Spaced Data,” Astrophysical Journal, 343, pp. 874-887. [20] Press, William H., Brian P. Flannery, Saul A. Teukolsky, and William T. Vettering (1992), Numerical Recipes: The Art of Scientific Computing, Second Edition, Cambridge Univ. Press, Cambridge. [21] Schuster, A., (1905), “The Periodogram and its Optical Analogy,” Proceedings of the Royal Society of London, 77, p. 136. [22] Nyquist, H., (1928), “Certain Topics in Telegraph Transmission Theory,” Transactions AIEE, 3, p. 617. [23] Nyquist, H., (1924), “Certain Factors Affecting Telegraph Speed,” Bell System Technical Journal, 3, p. 324. [24] Bretthorst, G. Larry, “Nonuniform Sampling: Bandwidth and Aliasing,” to appear in Maximum Entropy and Bayesian Methods, G. Erickson (eds.), Kluwer Academic Publishers, Dordrecht the Netherlands, 2001. [25] Bretthorst, G. Larry (1990), “Bayesian Analysis I, Parameter Estimation” J. Magn. Reson., 88, pp. 533-551. [26] Bretthorst, G. Larry (1990), “Bayesian Analysis II, Model Selection” J. Magn. Reson., 88, pp. 552-570.
BIBLIOGRAPHY
307
[27] Bretthorst, G. Larry (1990), “Bayesian Analysis III, Examples Relevant to NMR” J. Magn. Reson., 88, pp. 571-595. [28] Woodward, P. M. (1953), Probability and Information Theory, with Applications to Radar , McGraw-Hill, N. Y. Second edition (1987); R. E. Krieger Pub. Co., Malabar, Florida. 1990. [29] Bretthorst, G. Larry (1988), “Bayesian Spectrum Analysis and Parameter Estimation,” in Lecture Notes in Statistics, 48, J. Berger, S. Fienberg, J. Gani, K. Krickenberg, and B. Singer (eds), Springer-Verlag, New York, New York. [30] Bretthorst, G. Larry (1991), “Bayesian Analysis. IV. Noise and Computing Time Considerations,” J. Magn. Reson., 93, pp. 369-394. [31] Bretthorst, G. Larry (1992), “Bayesian Analysis. V. Amplitude Estimation for Multiple WellSeparated Sinusoids,” J. Magn. Reson., 98, pp. 501-523. [32] Bretthorst, G. Larry (1992), “Estimating The Ratio Of Two Amplitudes In Nuclear Magnetic Resonance Data,” in Maximum Entropy and Bayesian Methods, C. R. Smith et al. (eds.), pp. 67-77, Kluwer Academic Publishers, the Netherlands. [33] Gilks, W. R., S. Richardson and D. J. Spiegelhalter (1996), “Markov Chain Monte Carlo in Practice,” Chapman & Hall, London. [34] Neal, Radford M. (1993), “Probabilistic Inference Using Markov Chain Monte Carlo Methods,” technical report CRG-TR-93-1, Dept. of Computer Science, University of Toronto. [35] R. T. Cox, “The Algebra of Probable Inference,” Johns Hopkins Univ. Press, Baltimore, 1961. [36] Jaynes, E. T., Papers on Probability, Statistics and Statistical Physics, a reprint collection, D. Reidel, Dordrecht the Netherlands, 1983; second edition Kluwer Academic Publishers, Dordrecht the Netherlands, 1989. [37] Bretthorst, G. Larry, “An Introduction To Model Selection Using Bayesian Probability Theory,” in Maximum Entropy and Bayesian Methods, G. R. Heidbreder, ed., pp. 1–42, Kluwer Academic Publishers, Printed in the Netherlands, 1996. [38] Kotyk, John, N. G. Hoffman, W. C. Hutton, G. Larry Bretthorst, and J. J. H. Ackerman, “Comparison of Fourier and Bayesian Analysis of NMR Signals. I. Well-Separated Resonances (The Single-Frequency Case),” J. Magn. Reson., 98, pp. 483–500, 1992. [39] Neil, Jeffrey J., and G. Larry Bretthorst, “On the Use of Bayesian Probability Theory for Analysis of Exponential Decay Data: An Example Taken from Intravoxel Incoherent Motion Experiments,” Magn. Reson. in Med., 29, pp. 642–647, 1993. [40] Press W. H., S. A. Teukolsky, W. T. Vetterling and B. P. Flannary, Numerical Recipes The Art of Scientific Computing Second Edition, Cambridge University Press, Cambridge UK, 1992. [41] Chandramouli, Visvanathan, Karin Ekberg, William C. Schumann, Satish C. Kalhan, John Wahren, and Bernard R. Landau (1997), “Quantifying gluconeogenesis during fasting,” American Journal of Physiology, 273, pp. H1209-H1215.
308
THE BAYESIAN ANALYSIS PACKAGE
[42] Jones, John G., Michael A. Solomon, Suzanne M. Cole, A. Dean Sherry, Craig R. Malloy (2001), “An integrated 2 H and 13 C NMR study of gluconeogenesis and TCA cycle flux in humans,” American Journal of Physiology, Endocrinology, and Metabolism, 281, pp. H848-H856. [43] Malloy, Craig R., A. Dean Sherry, F. Mark H. Jeffrey (1990), “Analysis of tricarboxylic acid cycle of the heart using 13 C isotope isomers,” American Journal of Physiology, 259, pp. H987H995. [44] Malloy, Craig R., A. Dean Sherry, F. Mark H. Jeffrey (1988), “Evaluation of Carbon Flux and Substrate Selection through Alternate Pathways Involving the Citric Acid Cycle of the Heart by 13C NMR Spectroscopy,” Journal of Biological Chemistry, Vol. 263, No. 15, pp. 6964-6971. [45] Bretthorst, G. Larry, 1993, “On The Difference In Means,” in Physics & Probability Essays in honor of Edwin T. Jaynes, W. T. Grandy and P. W. Milonni (eds.), Cambridge University Press, England. [46] D. Andr´ d’Avignon, G. Larry Bretthorst, Marlyn Emerson Holtzer, and Alfred Holtzer, 1998, e “Site-Specific Thermodynamics and Kinetics of a Coiled-Coil Transiton by Spin Inversion Transfer NMR,” Biophysical Journal, 74, pp. 3190-3197. [47] D. Andr´ d’Avignon, G. Larry Bretthorst, Marlyn Emerson Holtzer, and Alfred Holtzer, 1999, e “Thermodynamics and Kinetics of a Folded-Folded Transition at Valine-9 of a GCN4-Like Leucine Zipper,” Biophysical Journal, 76, pp. 2752-2759. [48] Marlyn Emerson Holtzer, G. Larry Bretthorst, D. Andr´ d’Avignon, Ruth Hogue Angelette, e Lisa Mints, and Alfred Holtzer, 2001, “Temperature Dependence of the Folding and Unfolding Kinetics of the GCN4 Leucine Lipper via 13C alpha-NMR,’‘ Biophysical Journal, 80, pp. 939951.
Index
aliases, 26, 40 assigning probabilities, 31 Background analysis active message, 66 bandwidth, 25, 41 Bayes Analyze, 87, 100 Outputs amplitudes, 118 Best report, 125 Freq report, 126 Global parameters, 116 global parameters, 115 Header, 111 log file, 117 model file, 117 model parameters, 116 output file, 121 param file, 111 probabilities file, 128 probabilities report, 128 Regions report, 127 resonances, 117 Status, 107 status file, 110 summary1 file, 125 summary2 file, 126 summary3 file, 127 Widgets Bayes Analyze, 91 Bayes Model, 91 Best, 94, 107 By, 101, 108 Display Noise Region, 101 Display Signal, 101 Display Spectrum, 105 Filter, 101, 109 First Point, 103, 109 309 Freq, 94, 107 From, 101, 108 Full, 94 Imaginary Offset, 103, 109 Load Fid, 100 Mark Primary J, 104 Mark Res, 103 Mark Resonance Center, 103 Mark Secondary J, 104 Max New Res, 104, 109 Model Exp, 91 Noise, 101, 109 Number of Res, 105 Phase Corr/Uncorr, 102, 109 Pri, 103 Probs, 94 Real Offset, 103, 109 Regions, 94 Regs, 107 Remove All, 105 remove From, 105 Remove Res, 105 remove To, 105 Sec, 103 Signal, 101, 108 To, 101, 108 Toggle Shimming, 102, 109 Bayes Metabolite Compiling metabolite subroutines, 176 linking metabolite subroutines, 176 metabolite locations, 151 model equation, 146 the Bayesian calculation, 148 Widgets Add New (derived) Param, 167 Amplitude Ratios, 172 Current Derived Param, 168
310 Current J Param, 170 Current Metabolite Param, 167 Current Resonance, 173 Delete J, 170 Delete Res, 173 Delete This Param, 167 Edit Met Parm, 165 Edit Met Res, 152 Edit Res Parm, 152 Enter/Edit Resonances, 168 Enter/Return, 168 Freq Prior, 172 Go To Next (derived) Param, 168 Go To Next Param, 167 High (metabolite), 167 High decay rate constant, 173 High Frequency, 172 High J coupling constant, 170 J coupling constant name, 170 J Prior Is, 170 Load Bayes Analyze File, 173 Low (metabolite), 167 Low decay rate constant, 173 Low Frequency, 172 Low J coupling constant, 170 Mark New J, 168 Mark New Res, 170 Mean (metabolite), 167 Mean decay rate constant, 173 Mean Frequency, 172 Mean J coupling constant, 170 Metabolite file name, 165 Metabolite Type, 165 Metabolite type, 173 Name (derived), 168 Name (metabolite), 167 Next J, 170 Next Model, 152 Next Res, 173 Order Freq, 172 Pointer to Primary J, 171 Pointer to Secondary J, 172 Pointer to Tertiary J, 172 Prev Model, 152 Primary Mult Order, 171 Prior Is (metabolite), 167
INDEX Rate Prior, 173 resonance Description, 171 resonance Name, 171 resonance Type, 171 Run Analysis, 152 Sd (metabolite), 167 Sd decay rate constant, 173 Sd Frequency, 172 Sd J coupling constant, 170 Sec Mult Order, 171 Site Name, 171 Sys Dir, 151 Tertiary Mult Order, 172 Total J Params, 170 User Dir, 151 View Model Exp, 154, 163 Bayes Model, 87, 105 Widgets Analysis Experiment, 92 Bayes Model, 105 Best, 94 Data, 92 Freq, 94 Full, 94 Model Exp, 105 Model FID, 105, 106 Model run, 105 New Model, 106 Overlay, 91 Probs, 94 Regions, 94 Vertical, 92 Bayes’ theorem, 14, 81, 84, 137, 183, 188, 198, 205, 211, 219, 226, 236, 245, 248, 256, 263, 279 Bayesian calculations, the general features, 81 Behrens-Fisher ASCII data format, 273 model equation different mean and same variance, 266 different mean and variance, 267 same mean and different variance, 265 same mean and variance, 263 parameter listing, 271 the Bayesian Calculations different mean and same variance, 266
INDEX different mean and variance, 267 parameter estimation, 269 same mean and different variance, 265 same mean and variance, 263 the derived probabilities, 269 Widgets Add Second Set, 273 High σ, 276 High Mean, 276 Low σ, 276 Low Mean, 276 Next Set, 273 Run BF Analysis, 276 Big Peak/Little Peak model equation, 136 the Bayesian calculation, 137 Widgets Display Spectrum, 142 lb, 142 Mark A Peak, 143 Mark Res, 142 Mark Solvent, 142 Mark Solvent Freq, 142 Next Res, 143 Prev Res, 143 Remove Res, 143 Remove Solvent Freq, 142 Run Big Peak/Little Peak, 143 Solvent Freq High, 142 Solvent Freq Low, 142 View Model Exp, 143 Big z-magnetization transfer model equation, 217 the Bayesian calculation, 217 Widgets Kd , 221 Mz0 , 221 Rd , 221 Rw , 221 Block-McConnell Equations, 223, 233 canceling an analysis, 66 compiler Fortran, 285 gcc, 285 compilers Fortran, 282 GCC, 282 Contact time model equation, 203 the Bayesian Calculation, 203 Widgets High R1ρ , 206 High Rch , 206 Low R1ρ , 206 Low Rch , 206 Diffusion package model equation, 195 the Bayesian calculation, 197 Widgets Calb Exp, 201 Calibration D, 201 Data, 201 High D, 201 High grad p coef, 201 Load Calibration File, 201 Load Diffusion File, 201 Low D, 201 Low grad p coef, 201 Uncertainty, 201 Diffusion Tensor Analysis model equation, 211 the Bayesian calculation, 211 Widgets Diffusion Time, 214 Gamma, 214 High Eigenvalue, 212, 214 Include a constant, 214 No of Tensors, 214 Small Delta, 214 discrete Fourier transform, 24, 26, 37 Enter Ascii model equation, 279 model locations, 281 the Bayesian Calculation, 281 Widgets Add Param, 282 Build Executable, 283 Create New Model, 282, 283 Delete Param, 282
311
312 Edit Model, 283 Gaussian, 282 High, 282 Load PreDefined Model, 281 Low, 282 Name, 282 Next Param, 282 Order, 282 Prob Lst, 286 Run ASCII Analysis, 283 Sd, 282 Uniform, 282 Enter Spectroscopic Model model locations, 177 Widgets Edit/Create Resonance Model, 179 Edit/View Model Exp, 179 System Directory, 177 User Directory, 177 Errors In Variables model equation, 253 the Bayesian calculations, 256 Widgets ASCII file formats, 258 Given Errors In, 258 Pol Order, 258 Exponential Analysis model equation, 181 the Bayesian calculation the given model, 181 the unknown model, 187 Widgets High Amp, 183, 190 High Const, 183, 190 High Rate, 184, 190 Include a constant, 184 Low Amp, 183, 190 Low Const, 183, 190 Low Rate, 184, 190 No Exp., 184, 190 frequency estimation, 28, 46 GnuPlot, 67, 72 Kinetics z-Magnetization transfer
INDEX Arrhenius Plot, 239 Eyring equation, 235 model equation, 233 the Bayesian Calculation, 236 van’t Hoff Plot, 239 Widgets A Site, 239 Add Another Set, 239 B Site, 239 Delete Set, 239 Load Fid File, 238 Load Viscosity Table, 241 Next Set, 239 Run MT Kinetics Analysis, 239 Temperature, 239 Uncertainty, 239 loading A Vnmr Peak Pick, 58 An Image Pixel, 58 ASCII Files, 57 Bayes Analyze Files, 57 FID Files, 56 logical independence, 31 marginalization, 14 nonexhaustive hypotheses, 15 nuisance hypotheses, 14 nuisance parameter, 14 Marking J coupling constants, 103 Marking Resonances Display Spectrum, 103 Mark Primary J, 104 Mark Resonance Center, 103 Mark Secondary J, 104 Multiplets, 103 Multiplets of Multiplets, 104 Singlets, 103, 142 solvent, 142 Markov chain Monte Carlo, 46, 82 maximum entropy, 16 model comparison Bayes Metabolite, 176 Big Peak/Little Peak, 136 Build Your Own Resonance Model, 179 Enter Ascii, 286
INDEX given the exponential model, 186 the Diffusion Tensor analysis, 214 Model FID Format Bayes Analyze, 91, 106 Bayes Metabolite, 154 Bayes Model, 91 Big Peak/Little Peak, 143 nuisance parameter, 14, 29, 49 Nyquist critical frequency, 25, 41 plots Marginal Posterior Probability, 71 probability by repeat, 73 Residuals, 71 Residuals Only, 72 scatter plots, 72 the expected log likelihood, 73 Polynomials Given model equation, 243 the Bayesian calculations, 245 Unknown model equation, 247 the Bayesian calculations, 248 Widgets Pol Order, 246, 251 power spectrum, 25, 37, 38 prior probabilities Behrens-Fisher different mean and same variance, 267 different mean and variance, 268 same mean and different variance, 266 same mean and variance, 264 Big Peak/Little Peak, 137 Big z-magnetization transfer, 219 Contact time, 205 Diffusion package, 198 Diffusion Tensor, 212 Enter ASCII, 281 Errors In Variables, 256 Gaussian, 18, 20, 82 Jeffreys’, 32, 82 parameter ranges, 63 polynomials the Given model, 245 the Unknown model, 249 sums of exponentials the given model, 183 the unknown model, 189 uniform, 17, 32 z-magnetization transfer, 227 product rule, 13, 33
313
referencing Bayes Metabolite, 152 Build Your Own Resonance Model, 179 reports accepted file, 70 Best, 94 Freq, 94 Full, 94 mcmc values file, 67 Behrens-Fisher, 271 unknown number of exponentials, 192 probabilities file from Bayes Analyze, 94 probability of the model file, 67 Regions, 94 Schuster periodogram, 25, 37 simulated annealing, 83 sufficient statistics, 36 definition, 19 location parameter, 21 sum rule, 14, 33 Widgets data loading, 56 A Bayes Analyze File, 58, 59 A VNMR Peak Pick File, 58, 60 Add Another Set, 61, 62 An ASCII File, 58, 60 An Image Pixel, 58, 60 array, 61 ASCII Data, 58, 61 cf, 61 Current Set, 61 CWD, 57, 59 Data Scaled, 59 Data Scaled By, 61 Delete Set, 61, 62 Element, 61
314 FDF Dir, 60 Load FID File, 56 Next Set, 62 nf, 60 Pixel No. X, 58, 60 Pixel No. Y, 58, 60 Plot ASCII File, 58, 59 Set XY from cr and cr1, 60 Set XY from cr and cr1k, 58 Use Peak Number, 58, 59 Global CPUs entry box, 64 Reps, 83 Reps entry box, 64 Sims, 83 Sims entry box, 64 Steps entry box, 64 housekeeping, 55 Clear, 55, 70 Display Spectrum, 55 Help, 51, 56 Manual, 56 Print/Display/File, 55 Return, 56, 80 Save, 56 Save Directory Name, 56 Startup/Help Msg, 55 Status, 55 Model FID Analysis Experiment, 80 running the analysis, 65 Foreground/Background/Remote, 65, 66 Notify, 67 run analysis, 66 Status, 65 viewing the output, 67 Accepted, 80 All, 80 Clear Lst, 70 Clear Prob File, 70 Cur Plot, 67, 71 Data Fid, 78 Data Spectrum, 77 Fid Model, 80 FIDS 3, 80 GnuPlot, 67, 72 Horizontal, 78 Model Fid, 78 Model Fids, 80 Model Spectrum, 77 Next Plot, 67, 72 Overlay, 78 Parameters List, 67 Params, 80 Params Lst, 67 Prev Plot, 67, 72 Prob, 80 Prob List, 67 Prob Lst, 67 Res Model, 77 Resid Spectrum, 77 Stacked, 78 Text, 77 Vertical, 78 View Model Exp, 74 z-magnetization transfer model equation, 223 Widgets Kab , 231 Kba , 231 R1a , 231 R1b , 231 a Site, 230 b Site, 230 Add Another Set, 231 Run MT Z Analysis, 231
INDEX