Skip to main content
. 2017 Apr 17;114(21):5373–5377. doi: 10.1073/pnas.1616426114

Algorithm S1.

Metropolis Hastings algorithm applied to the parameter estimation problem described here. The algorithm is repeated for NIt iterations, of which some initial subset is discarded as burn-in. At each iteration, a set of values for each parameter type (e.g., OH concentration, interhemispheric exchange rate, etc.) is proposed jointly (e.g., for all years). The scalars U and n are pseudorandom numbers chosen at each iteration from a uniform [U(0,1)] and Gaussian [N(0,1)] distribution, respectively

Set 𝜽0𝜽prior
Forward model run to calculate 𝐲model(θ0,ϕ0)
for i[1,NIt] do
for pi[1,Nparam] do
Propose new hyperparameter state for parameter pi PDF if
required: ϕpϕi1+n1Δϕ
Propose new parameter state for parameter pi: θpθi1+
n2Δθ
Run model to determine 𝐲model(θp,ϕp)
Aln(ρ(𝐲(θp,ϕp)|θp,ϕp))ln(ρ(𝐲(θi1,ϕi1)|θi1,ϕi1))+
ln(ρ(θp,ϕp))ln(ρ(θi1,ϕi1))
if ln(U)<A, then
Accept proposed state θiθp
else
Reject proposed state θiθi1