The B2Z R-package fits the Bayesian two-zone model proposed by Zhang et al. (2009). Denote CN(t) and CF(t) by the concentrations at time t in the near and far fields, respectively. The deterministic equations in the two-zone modeling are given by:
B2ZM obtains random samples from the posterior distribution of parameters and exposure concentrations for the Bayesian two-zone model proposed by Zhang et al. (2009). Three sample methods are available: Gibbs with Metropolis step (MCMC), Incremental Mixture Importance Sampling (IMIS) and Sampling Importance Resampling (SIR). In addition, estimation using the Bayesian central limit theorem (Laplace approximation) is available. The user can choose whether the near and far field measurement error processes are dependent or not. In the independent model, 5 parameters are considered: 1) Beta: Interzonal air flow rate (m3); 2) Q: supply and exhaust flow rate (m3/min); 3) G: contaminant emission rate (mg/min); 4) Tau_N: variance of the measurement error at the near field; 5)Tau_F; variance of the measurement error at the far field. In the dependent model (default), one more parameter is considered: 6) Tau_NF: covariance between the measurements at the near and far field. Any prior distribution for Beta, Q and G can be chosen. In the independent model, the prior distributions for Tau_N and Tau_F are inverse gamma distributions; in the dependent model, the prior joint distribution of Tau_N, Tau_NF and Tau_F is the Inverse Wishart Distribution (see the Details section for more information on the parameterization of these distributions). The output from B2ZM is a list that belongs to one of the following classes: mcmc, imis, sir and bclt. This output is valid as an input for the functions summary and plot.
B2ZM_BCLT
(Package: B2Z) :
Bayesian Two-Zone Models: using Bayesian Central Limit Theorem (BCLT) - Laplace Approximation
B2ZM_BCLT obtains random samples from the posterior distribution of the parameters and exposure concentrations for the Bayesian two-zone model proposed by Zhang et al. (2009) using the Bayesian Central Limit Theorem (Laplace Approximation). The user can choose whether the near and far field measurement error processes are dependent or not. In the independent model, 5 parameters are considered: 1) Beta: Interzonal air flow rate (m3); 2) Q: supply and exhaust flow rate (m3/min); 3) G: contaminant emission rate (mg/min); 4) Tau_N: variance of the measurement error at the near field; 5)Tau_F; variance of the measurement error at the far field. In the dependent model (default), one more parameter is considered: 6) Tau_NF: covariance between the measurements at the near and far field. Any prior distribution for Beta, Q and G can be chosen. In the independent model, the prior distributions for Tau_N and Tau_F are inverse gamma distributions; in the dependent model, the prior joint distribution of Tau_N, Tau_NF and Tau_F is the Inverse Wishart Distribution (see the Details section for more information on the parameterization of these distributions). The output from B2ZM_BCLT is a list that belongs to the class bclt. This output is valid as an input for the functions summary and plot.
B2ZM_IMIS
(Package: B2Z) :
Bayesian Two-Zone Models: using IMIS sampler
B2ZM_IMIS obtains random samples from the posterior distribution of the parameters and exposure concentrations for the Bayesian two-zone model proposed by Zhang et al. (2009) using the Incremental Mixture Importance Sampling (IMIS). The user can choose whether the near and far field measurement error processes are dependent or not. In the independent model, 5 parameters are considered: 1) Beta: Interzonal air flow rate (m3); 2) Q: supply and exhaust flow rate (m3/min); 3) G: contaminant emission rate (mg/min); 4) Tau_N: variance of the measurement error at the near field; 5)Tau_F; variance of the measurement error at the far field. In the dependent model (default), one more parameter is considered: 6) Tau_NF: covariance between the measurements at the near and far field. Any prior distribution for Beta, Q and G can be chosen. In the independent model, the prior distributions for Tau_N and Tau_F are inverse gamma distributions; in the dependent model, the prior joint distribution of Tau_N, Tau_NF and Tau_F is the Inverse Wishart Distribution (see the Details section for more information on the parameterization of these distributions). The output from B2ZM_IMIS is a list that belongs to the class imis. This output is valid as an input for the functions summary and plot.
B2ZM_MCMC
(Package: B2Z) :
Bayesian Two-Zone Models: using Gibbs with Metropolis step
B2ZM_MCMC obtains random samples from the posterior distribution of parameters and exposure concentrations for the Bayesian two-zone model proposed by Zhang et al. (2009) using Gibbs with Metropolis step. The user can choose whether the near and far field measurement error processes are dependent or not. In the independent model, 5 parameters are considered: 1) Beta: Interzonal air flow rate (m3); 2) Q: supply and exhaust flow rate (m3/min); 3) G: contaminant emission rate (mg/min); 4) Tau_N: variance of the measurement error at the near field; 5)Tau_F; variance of the measurement error at the far field. In the dependent model (default), one more parameter is considered: 6) Tau_NF: covariance between the measurements at the near and far field. Any prior distribution for Beta, Q and G can be chosen. In the independent model, the prior distributions for Tau_N and Tau_F are inverse gamma distributions; in the dependent model, the prior joint distribution of Tau_N, Tau_NF and Tau_F is the Inverse Wishart Distribution (see the Details section for more information on the parameterization of these distributions). The output from B2ZM_MCMC is a list that belongs to the classe gibbs. This output is valid as an input for the functions summary and plot.
B2ZM_SIR
(Package: B2Z) :
Bayesian Two-Zone Models: using SIR sampler
B2ZM_SIR obtains random samples from the posterior distribution of the parameters and exposure concentrations for the Bayesian two-zone model proposed by Zhang et al. (2009) using Sampling Importance Resampling (SIR). The user can choose whether the near and far field measurement error processes are dependent or not. In the independent model, 5 parameters are considered: 1) Beta: Interzonal air flow rate (m3); 2) Q: supply and exhaust flow rate (m3/min); 3) G: contaminant emission rate (mg/min); 4) Tau_N: variance of the measurement error at the near field; 5)Tau_F; variance of the measurement error at the far field. In the dependent model (default), one more parameter is considered: 6) Tau_NF: covariance between the measurements at the near and far field. Any prior distribution for Beta, Q and G can be chosen. In the independent model, the prior distributions for Tau_N and Tau_F are inverse gamma distributions; in the dependent model, the prior joint distribution of Tau_N, Tau_NF and Tau_F is the Inverse Wishart Distribution (see the Details section for more information on the parameterization of these distributions). The output from B2ZM_SIR is a list that belongs to the class sir. This output is valid as an input for the functions summary and plot.
ex1 contains 100 simulated concentrations during the times between 0 and 4, using the parameters Beta = 5, Q = 13.8, G = 351.5, VN = pi*10^-3, VF = 3.8, Tau_N = 1, Tau_NF = 0.5 and Tau_F = 0.64.
ex2 contains 100 simulated concentrations during the times between 0 and 4, using the parameters Beta = 5, Q = 13.8, G = 351.5, VN = pi*10^-3, VF = 3.8, Tau_N = 1, Tau_NF = 0 and Tau_F = 0.64.