Description Usage Arguments Value Author(s) See Also

View source: R/parDA_theta_MH.R

This function updates parameters for the Bayesian statistical model. gamma is updated with a discrete uniform prior; beta is updated with noninformative prior 1 and random-walk proposal; log of sigma (variance in W) is updated with normal prior and random-walk proposal; lambda is updated with normal prior and random-walk proposal. This function is used in parallel computing of the MCMC algorithm.

1 2 | ```
parDA_theta_MH(outW, theta, prior_theta, ADtheta, loglik_old, chisq_old, N, Lj,
tol = 1e-10)
``` |

`outW` |
a 7 by 1 list containing precomputed quantities associated with W |

`theta` |
a list of 3 elements contained in parameters in MCMC algorithm |

`prior_theta` |
quantities (parameters) in prior dist. |

`ADtheta` |
a 6 by 1 list containing quantities to adjust mean and covariance in proposal dist |

`loglik_old` |
a real number representing likelihood for given parameters |

`chisq_old` |
a real number representing the quadratic form |

`N` |
number of temperature ensemble members |

`Lj` |
an m by 1 vector containing the number of runs for each forcing scenario |

`tol` |
a very small value to avoid numerical instability |

a list of updated parameters, loglikelihood, chisq statistics (quadratic form), and prior

Pulong Ma <[email protected]>

DA_theta_MH

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.